Link to home
Start Free TrialLog in
Avatar of mcottom
mcottom

asked on

Relink Access tables from code

In my Front end Access 2000 database, I have several linked tables from SQL Server database.  How can I make sure that all tables get connected when the front end is opened? That is I am looking for some code that will check that the tables are connected and then if not it will connect them for me (w/o prompting me to do it).

ps. I found this which is perfect http://www.mvps.org/access/tables/tbl0009.htm except that it prompts the user to re-link the tables which I do not want to do.
Avatar of dovholuk
dovholuk

if it works perfect, just comment out the line that says:

If MsgBox("Are you sure you want to reconnect all Access tables?", _
            vbQuestion + vbYesNo, "Please confirm...") = vbNo Then Err.Raise
cERR_USERCANCEL


or delete it entirely... then the user won't be asked.

enjoy! ;-)

dovholuk
ASKER CERTIFIED SOLUTION
Avatar of Daniel Stanley
Daniel Stanley
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial