title: Catching Microsoft Access ODBC connection errors to SQL Server linked tables
body: <p>I have a little Access application with linked tables to SQL Server that I use at a couple different sites so the SQL server names and sometimes the SQL database and odbc connection names are different from site to site.  However they use the Access Runtime to use it so don't have the ability to relink tables without the full version.  I'm struggling to find a way to catch any ODBC connection errors and then offering them the option to relink the tables by typing in the ODBC connection name etc. and then relinking through VBA code which I believe is possible. (<a href="http://www.access-programmers.co.uk/forums/showthread.php?t=143180" rel="nofollow">http://www.access-programmers.co.uk/forums/showthread.php?t=143180</a> for example)</p>
  
  <p>The database loads immediately on a form with a record source on a linked table so it needs to catch the error on that form if possible.  I guess I can add a main menu with a button to relink tables there but would prefer avoiding introducing a menu form which requires an extra click for users.</p>
  
  <p>Have found these articles but I'm unable to catch the initial odbc failure to connect in the form's On Error event and have tried the Activate event as well.  Any suggestions would be highly appreciated!</p>
  
  <p><a href="http://support.microsoft.com/kb/209855" rel="nofollow">http://support.microsoft.com/kb/209855</a></p>
  
  <p><a href="http://www.access-programmers.co.uk/forums/showthread.php?t=198039" rel="nofollow">http://www.access-programmers.co.uk/forums/showthread.php?t=198039</a></p>