Is it possible to get and use TableDefs from a database other than the CurrentDB. My application accepts a database name from the user and displays info about that database...tables and associated fields, indexed, primary keys, etc. Is there a way to use TableDefs where db is referencing a table other than the current database? Part of my problem is that I'm not really clear on what TableDefs is and or does.
Set db = CurrentDb
Set tblT = db.TableDefs(psdTableName)
For Each idx In tblT.Indexes
If idx.Primary Then
Debug.Print idx.Name, idx.Foreign, idx.Primary, idx.Unique, idx.Required
indexName = idx.Primary
Form_frmDatabaseInfo.cbxPrimaryKey.Value = idx.Name
Set db = CurrentDb
Set tblT = db.TableDefs(psdTableName)
For Each idx In tblT.Indexes
If idx.Primary Then
Debug.Print idx.Name, idx.Foreign, idx.Primary, idx.Unique, idx.Required
indexName = idx.Primary
Form_frmDatabaseInfo.cbxPrimaryKey.Value = idx.Name