Is it possible to populate a combo box with a list of all tables in a database and view a tables contents based on the selection made in the combo box?
Is the purpose of this to open a table to view or edit data?
If it's to edit, then don't. Use forms instead.
To get a list of tables, create a combobox and in the rowsource put this SQL:
Code:
SELECT MSysObjects.Name
FROM MSysObjects
WHERE (((MSysObjects.Type)=1 Or (MSysObjects.Type)=6) AND ((Left([Name],4))<>'MSys'))
ORDER BY MSysObjects.Name;
Objecttype 1 is localtables and objecttype 6 is linked tables.
Courtesy of Bob (aka boblarson). One thing you can extract from what is given in Bob's example is the aliasing of report names, you can for example change each to uppercase, UCASE().