How do I display the list of queries in the DB in a combobox?
ummmm...
Why would you WANT to?
Most queries in a reasonably complex database are used for specific purposes -
combo box rowsources, subform record sources, action queries to delete all
records in a table, etc. etc.
Users should rarely or never need to see a query datasheet, or directly open a
query in any case. Datasheets are very limited and not designed for data
presentation; Forms (or Reports) are much better.
That said... set the RowSource of a combo to
SELECT [Name] FROM [MSysObjects] WHERE [Type] = 5 ORDER BY [Name];
to see all queries. Base a combo on this query if you wish.
You may want to add another criterion to conceal normally hidden system
queries:
SELECT [Name] FROM [MSysObjects] WHERE [Type] = 5 AND [Name] NOT LIKE "~sq*"
ORDER BY [Name];
John W. Vinson [MVP]