In lesson 5, Richard tells us how to link each table on the Server. I use this when my database starts. At the end of this procedure, a message box informs the user that connecting to the server was successful, and the logon form loads. Perhaps that won't always be the case, however. I wonder how to address the situation where the linking was unsuccessful. How do I know it failed? I wonder if a solution is to count the number of linked tables when the procedure is finished; if that count is less than it should be, a failure occurred. Is there a better method? The only cause for a failure I can think of is if the internet connection is broken or slow. Could there be other causes?
Kevin Yip
@Reply 2 years ago
You can check if a table is successfully linked by opening a recordset to retrieve a few records from the table, and catch the error, if any. Many things could cause a failed link (bad connection string, bad network, deleted or renamed table, etc.). So it could be tough to check for the exact error(s) with VBA code.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access SQL Server Lessons.