Thank YOU... and sorry I felt that I had to "yell" at you to get here.
There are a couple of problems that I see. For one thing, the foreign key of a relationship must always be in the "many" side table, linked to the primary key of the "one" side table. So since you could have many different ODBC links to a particular SQL
database, it's not correct to have the ODBCID2 field in tblSQLDB. If you do that, then you would be able to set up one, and only one, such link. You need many!
Since - in the real world - one ODBC link must point to one and only one Database, you need to put the database ID in the ODBC table, not the other way around.
I'm also not sure that it's appropriate to have a one (SQL/Server database) to many (Access database) relationship. It
may be appropriate in your shop, if in practice each Access database is linked to only one SQL instance; but the technology allows for the possibility that you could have one Access frontend linked to two or more SQL backends (and of course you already
model the fact that each SQL backend could be linked to multiple Access frontends). Similarly, you could have several different ODBC connections in one Access database, as well as several different Access databases for a given ODBC connection. Do you?
Don't change the structure unless you need to - no point in spending a lot of time solving a nonexistant problem! - but I did want to bring up the concern.
Now a bigger issue. You seem to be making a very common mistake, creating a multitable query (tblODBC joined to tblSQLdb) and using that joined query as the Recordsource for a form. You don't need to do this, and it can and will cause trouble.
Instead, if - as it appears - you have a linear heirarchy, use Forms and Subforms: a Form for the "one" side table of a relationship, with a Subform for the "many". I think you may be able to use a structure like:
frmSQLDatabases
<recordsource tblSQLDB>
<you'ld just have a combo box on this form to select the SQL Server for this database>
sbfrmODBC
<a Subform showing all the ODBC connections to the currently selected tblSQLDB record>
sbfrmAccessDB
<a sub-subform showing all of the Access databases that use that ODBC connection>
sbfrmTables
<a sub-sub-subform showing all of the tables in that Access database>
You should certainly consider having a Text field in the table of Tables in which you could store the CONNECT string for that table, available from the Tabledef collection's properties in VBA. It contains the information needed to recover the name of the
ODBC connection, the server, the parent table (which might be different than the name of the linked table), etc.
Good luck and keep posting back... and do try to talk openly to your coworkers and boss about realistic understanding on both sides about what is needed, what is practical, and how much time it may take!