DMW logo

How to List All Forms in a
Microsoft® Access Database

How to create a VBA function to use in its Visual Basic Editor’s Immediate Window to list all the forms in your current Access database.

Last updated on 2022-10-26 by David Wallis.

VBA Function to List All Forms

This function lists all the forms in the database in which you execute it:

Function fnDmwListAllForms() As String

On Error GoTo errHandler

Dim msg$

Dim frm As AccessObject, dB As Object

Set dB = Application.CurrentProject

For Each frm In db.AllForms

Debug.Print frm.Name

Next frm

msg$ = "Forms listing complete"


fnDmwListAllForms = msg$

Exit Function


msg$ = Err.Number & " " & Err.Description

Resume procDone

End Function

How to Run Your Function

To execute the function, copy and paste the above code into a module in your database’s Visual Basic Editor.

Then in its Immediate Window type ?fnDmwListAllForms and press Enter. The leading question mark is essential.

Your Support for DMW TIPS

Please support this website by making a donation to help keep it free of advertising and to help towards cost of time spent adding new content.

To make a contribution by PayPal in GBP (£ sterling) —

To make a contribution by PayPal in USD ($ US) —

Thanks, in anticipation.


DMW Consultancy Ltd does not accept any liability for loss or damage to data to which any techniques, methods or code included in this website are applied. Back up your data; test thoroughly before using on live data.

“Lists are how I parse and manage the world.”

Adam Savage