Code to Link Tables

scotthutchings

Registered User.
Local time
Today, 15:15
Joined
Mar 26, 2010
Messages
96
I need to write code that enables the user to point to the back-end database and then links to all the tables in that database. The be database is also password protected so I need the code (not the user) to pass the password along. How do I do this?
 
code for linking tables:
Code:
    DoCmd.TransferDatabase acLink, "Microsoft Access", destinationFileName, acTable, tblName, tblName

for having the user point out filr location, I suggest you use this module I have found somewere on the web, and is credited inside it. step into the runnining code and learn exactly how to use it, this is the most reliable file browser you will find for Access.

about the password, I am sorry I cant realy help you...
 

Attachments

I get an OLE Server Active X error when I tried to use that sample to browse for a file.

This sample does not require any active x or the need to set references... Browse [Find a directory or file]
 
The error message is because I once had the ActiveX on my form. I was going to post anothe demo, but I see you are the source to the "module I have found somewere on the web", and glad to give you the credit, and say: IT IS GRAET!
 
Here is a copy of some code that was created by Carl Tribble a few years ago.

I have added a form called frm_relink so that the user can relink the tables. If the relevant back ends can be found the code automatically relinks the tables. If the backends can not be found a window pops up for the user to browse for the correct file location.
 

Attachments

Users who are viewing this thread

Back
Top Bottom