When an error occurs on form load, how do I resume opening after fixing the error?
Posted on 2006-11-14
When my form loads, it does some tLookups to retrieve settings. If the database is missing, renamed, etc., an error occurs. At this point I let the user reconnect to the database. Now I want to resume loading the form again, but it stays stalled wherever the error occurred. If the error occurred on the open event I could do cancel = true, but that isn't where the error occurrs. In fact, it doesn't appear to really occur in any procedure so I had to trap on the form's error event.
I've tried to close the form by using a function to close it before reconnecting the tables, but it crashes Access.
The Errors that trigger this relinking action are:
3024, 3043, 3044, 3151, 3146, 3078