Import Table Via Macro

robbydogg

Registered User.
Local time
Today, 16:24
Joined
Jul 15, 2008
Messages
56
Hello,

Is there a way of using the TransferDatabase - Link function in a macro to link a table from another database place on the server, but offering the user the option to find and select the other database?
The reason behind this is I have one database which does a load of work for the user, but each week our IT people output a new database with the suffix of the latest date.

So last week the database could be called Data05052010.mdb and this weeks may be Data11052010.mdb.

All I need is for a search function for the user to decide where to link to?

Thanks in advance.
 
Hi,

Right i am sort of there.

I have used Mod Browser, originally written by Ken Getz to get the selected file (i'll let the user do this.
I just need now to get the following code to work:

DoCmd.TransferDatabase acLink,"Microsoft Access", ##Here it needs to select the value from btnBrowse in the form called FORM## , actable, "PartsDespatches", "PartsDespatches"
any ideas?

Thanks
 
Managed to solve it myself through a bit of searching:

Private Sub Command4_Click()

DoCmd.TransferDatabase acLink, "Microsoft Access", Forms!frmUpdate!Text1.Value, acTable, "PartsDespatches", "PartsDespatches"
 

Users who are viewing this thread

Back
Top Bottom