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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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