logo
search
Others

How to List User-Created Objects in Microsoft Access

Olivia MillerOlivia Miller Sep 28, 2026 869 views

Question details

The user needs to retrieve a list of all user-created tables, queries, forms, and reports in a Microsoft Access database.

How to List User-Created Objects in Microsoft Access
Product
Microsoft Access
Device & OS
not provided
Scenario
Auditing or managing a database where some objects might be hidden from the Access Navigation Pane.
Observed behavior
The user seeks a programmatic method to enumerate all custom database objects while excluding system tables and temporary queries.
Before you start

Ensure you have a basic understanding of the VBA editor in Microsoft Access and have backed up your database before running new scripts.

Solution 1Recommended

Use VBA and DAO Collections to List Database Objects

Execute a VBA script that iterates through DAO TableDefs, QueryDefs, and CurrentProject collections to identify and print all non-system objects to the Immediate window.

Forms and other objects can be hidden from the Navigation Pane, but they remain represented in the database metadata. You can use DAO objects and the CurrentProject collections to safely enumerate all user-created items.

1
Open the VBA Editor

Launch your Microsoft Access database and press Alt + F11 on your keyboard to open the Visual Basic for Applications (VBA) editor.

2
Insert a New Module

In the VBA editor menu, click 'Insert' and select 'Module' to create a blank script window.

3
Paste the VBA Script

Copy and paste the following script. This code loops through db.TableDefs, db.QueryDefs, CurrentProject.AllForms, and CurrentProject.AllReports, filtering out objects that begin with 'MSys' (system tables) and '~' (temporary queries): Sub ListDatabaseObjects() Dim db As DAO.Database Dim tbl As DAO.TableDef Dim qry As DAO.QueryDef Dim frm As AccessObject Dim rpt As AccessObject Set db = CurrentDb() Debug.Print "Tables:" For Each tbl In db.TableDefs If Left(tbl.Name, 4) <> "MSys" Then Debug.Print tbl.Name Next tbl Debug.Print "Queries:" For Each qry In db.QueryDefs If Left(qry.Name, 1) <> "~" Then Debug.Print qry.Name Next qry Debug.Print "Forms:" For Each frm In CurrentProject.AllForms Debug.Print frm.Name Next frm Debug.Print "Reports:" For Each rpt In CurrentProject.AllReports Debug.Print rpt.Name Next rpt Set db = Nothing End Sub

4
Run the Script and View Results

Press F5 to run the macro. To view the generated list, press Ctrl + G to open the 'Immediate' window at the bottom of the VBA editor, where all user-created object names will be printed.

Use VBA and DAO Collections to List Database Objects
Hidden Objects: Even if forms or tables are hidden in the Navigation Pane, they will still appear in these VBA collections, ensuring you get a complete list of your database architecture.
Free Microsoft Office alternative

Looking for a Lightweight Office Suite? Try WPS Office

While Microsoft Access is a specialized tool for complex databases, WPS Office provides a powerful, free alternative for your everyday document, spreadsheet, and presentation needs. It perfectly handles Word, Excel, and PowerPoint files without the heavy subscription fees.

  1. 1. Download WPS Office: Visit the official WPS Office website and click the free download button for your operating system.
  2. 2. Install the Software: Run the downloaded installer and follow the simple on-screen instructions to set up the suite.
  3. 3. Open Your Documents: Launch WPS Office to instantly open, edit, and save your existing Word, Excel, and PowerPoint files seamlessly.
Seamless compatibility with Microsoft Office formats like DOCX, XLSX, and PPTX.Lightweight installation that consumes minimal system resources compared to Microsoft 365.Completely free to download and use with a highly familiar, easy-to-learn tabbed interface.Built-in PDF editing tools and smart AI assistants to streamline your daily workflow.
microsoft office alternative - wps office

Frequently Asked Questions

Why do I need to exclude tables starting with 'MSys'?

Tables beginning with 'MSys' (like MSysObjects) are system tables created and managed automatically by Microsoft Access to store metadata and database structural information. Filtering them out ensures your list only contains objects you created.

How do I show hidden objects directly in the Access Navigation Pane?

Right-click the top header of the Navigation Pane and select 'Navigation Options'. Under 'Display Options', check the box for 'Show Hidden Objects' and click OK. Hidden objects will now appear slightly grayed out.

Why use CurrentProject instead of DAO for Forms and Reports?

While DAO is excellent for data-level objects like tables and queries (TableDefs and QueryDefs), Forms and Reports are application-level objects. Using CurrentProject.AllForms and CurrentProject.AllReports correctly enumerates all saved forms and reports regardless of whether they are currently open or closed.

Where do I find the Immediate Window in the VBA editor?

The Immediate Window is typically located at the bottom of the VBA editor screen. If it is not visible, you can display it by clicking 'View' on the top menu bar and selecting 'Immediate Window', or by pressing the Ctrl + G shortcut key.