DAPs with Linked Tables?

F

Frank B

I used an approach like this to solve a similar problem.
Hard code the server path in a CONST.
In VBA figure out if you are running on a workstation or
on the server. Then, set a variable to properly point to
the DB that contains the tables you want to attach. Then,
in VBA Attach the table (using that variable that contains
the proper path). When you are done, use VBA to detach
the tables and close down.
Frank
 
F

Frank B

If someone gives you an easier solution, please take it
because you will grunt and groan learning VBA; but I
highly encourage you to expend the effort if you are
serious about what you are doing. I will get you started,
but teaching you VBA, or solving your problem, is not
something I have time to do.

To answer your question, and get you started....

The code goes in a Module. Open a NEW Module, and in that
module create a function, by typing: Function MyStart

Insert one line of code inside the function:
Msgbox "Hello"
and save the Module as BeginHere.

Then, create a NEW Macro and in the Action column select
RunCode, look down for where it is asking for the Funtion
Name and type in: MyStart()

Save the Macro as "AutoExec"

Close your MDB, then reopen it, the Autoxec macro is
automatically run at start-up, and you should see a dialog
box pop-up that says "Hello"

This gets you into the world of VBA, and it has you at the
very beginning point where you would insert the VBA code
to attach all your tables. As you insert more code into
your function use the F1 key to summon up "Help" and use
the VBA Help system which offers not only descriptions,
but lots of code samples. For example: put the cursor on
one of the letters in MsgBox and press F1... you should
see more than you will ever want to know about MsgBox.

Best wishes, .... Frank
 
B

Bruce Bridges

How do I put a Module in a DAP?
-----Original Message-----
If someone gives you an easier solution, please take it
because you will grunt and groan learning VBA; but I
highly encourage you to expend the effort if you are
serious about what you are doing. I will get you started,
but teaching you VBA, or solving your problem, is not
something I have time to do.

To answer your question, and get you started....

The code goes in a Module. Open a NEW Module, and in that
module create a function, by typing: Function MyStart

Insert one line of code inside the function:
Msgbox "Hello"
and save the Module as BeginHere.

Then, create a NEW Macro and in the Action column select
RunCode, look down for where it is asking for the Funtion
Name and type in: MyStart()

Save the Macro as "AutoExec"

Close your MDB, then reopen it, the Autoxec macro is
automatically run at start-up, and you should see a dialog
box pop-up that says "Hello"

This gets you into the world of VBA, and it has you at the
very beginning point where you would insert the VBA code
to attach all your tables. As you insert more code into
your function use the F1 key to summon up "Help" and use
the VBA Help system which offers not only descriptions,
but lots of code samples. For example: put the cursor on
one of the letters in MsgBox and press F1... you should
see more than you will ever want to know about MsgBox.

Best wishes, .... Frank


.
 
F

Frank B

I do not use DAPs, so I know very little about them. I
will conjecture that DAPs are very restrictive and only
allow access to scripts written in a VB scripting
language. (maybe?). DAPs always looked a bit hokey to me,
so I have stayed away from them. I would think they might
be OK for unsophisticated work inside an intranet, but
that is about it. (I could be wrong.)

Although I have very little experience in the following
suggestion, I would consider using "MS Frontpage" to
develop your web pages where you can include access to
your MDB tables. Frontpage, I believe, offers you a more
robust develpment enviornment which not only allows for
scripts, but ASP develpment as well. You could carry this
even one more robust level by skipping over Frontpage and
go to the big kahuna and use .NET and have the richest
development environment available to mankind. If you are
not a programmer, Frontpage would surely be your best bet.

Finally, consider moving all your tables into one MDB, and
avoid the attach problem altogether. Then, let the other
guy attach to your tables. Again, I'm thinking that with
DAPs you have to avoid sophistication.

Best wishes.... Frank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top