I've tested many ways to accomplish this, but none of the code I've found works quite right. I am using the code written by Dev Ashish but it replicates some of the functionality I already have. And, if you change the path to the back end manually and launch the db, Dev's code throws an error.
I think this request is fairly straightforward for someone experienced. I'm sure the code exists for this somewhere but I can't find it. Using Access 2007.
I have a split db setup and also another table that exists as a linked table. I've created forms (Form1, Form2) that allow an end user to change paths to these linked db's and this bit works fine. I have a startup form ready to accept code to check the following two items:
One of my linked back-end tables is called TblDepartment. I would like to check if this linked table exists and is accessible during startup. No need to iterate through all the tables, so I arbitrarily picked TblDepartment. If not-accessible, then open Form#1.
Next, the other stand alone linked mdb (not part of the BE db), has the same field names as one of my local tables and joins my main db via a union query. Again, I would like to check to see that this db is linked properly on startup. If not-accessible, then open Form#2.
As a side note, my db which I inherited from another developer has mixed references to DAO and ADODB. Would it be beneficial to change all code to one or the other?
Thanks for the look.
I think this request is fairly straightforward for someone experienced. I'm sure the code exists for this somewhere but I can't find it. Using Access 2007.
I have a split db setup and also another table that exists as a linked table. I've created forms (Form1, Form2) that allow an end user to change paths to these linked db's and this bit works fine. I have a startup form ready to accept code to check the following two items:
One of my linked back-end tables is called TblDepartment. I would like to check if this linked table exists and is accessible during startup. No need to iterate through all the tables, so I arbitrarily picked TblDepartment. If not-accessible, then open Form#1.
Next, the other stand alone linked mdb (not part of the BE db), has the same field names as one of my local tables and joins my main db via a union query. Again, I would like to check to see that this db is linked properly on startup. If not-accessible, then open Form#2.
As a side note, my db which I inherited from another developer has mixed references to DAO and ADODB. Would it be beneficial to change all code to one or the other?
Thanks for the look.
Comment