List objects in linked database

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, all!

How do I iterate the table and query objects in a linked database? I want
to use that info as the row source of a combo box.

Thanks,
Bruce
 
Hi Bruce,

You could try linking the MSysObjects table in your linked database.
Assuming you call this linked table 'LinkedObjects' then the tables in your
linked database can be obtained from

SELECT [Name] FROM LinkedObjects WHERE Type = 1 And [Name] NOT LIKE "MSys*"

and the queries from

SELECT [Name] FROM LinkedObjects WHERE Type = 5 And [Name] NOT LIKE "~*"

The reason for excluding queries starting with ~ is because I think Access
stores hidden queries when you use SELECT statements as record sources for
forms or row sources for combo boxes or list boxes.
 
Back
Top