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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top