Query for database objects

  • Thread starter Duncan via AccessMonster.com
  • Start date
D

Duncan via AccessMonster.com

Hi,

I would like to write a query that will give me the list of all tables,
queries, forms, reports and macros in the Access 2003 database. Is this
possible? If yes, then what is that query. If no, is there an alternate way
of getting access to it?

Thanks in advance.
 
J

John Spencer

You can query the MsysObjects Table (hidden table)

SELECT Name, Type
FROM MSysObjects
WHERE Type In (1,4,5,6,-32764,-32766,-32761,-32768) AND [Name] Not Like "Msys*"

These are the types I've discovered.
# Description
-32768 Form
-32766 Macro
-32764 Report
-32761 Module
-32758 ???
-32757 ???
1 Local Access (Jet) Tables
2 ???
3 Containers
4 Linked (ODBC? SQL?) Tables
5 Queries
6 Linked Jet Tables
7 ???
8 Relationships


John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 
Top