DMW logo
tel 01732 833085
tonbridge · kent · UK

VBA Function to List All Reports in
Microsoft® Access Databases

Last updated on 2020-03-24 by David Wallis.

Below is a VBA function that lists all the reports in your current database. You use the function in the Immediate Window of your database’s Visual Basic Editor where the function will produce the list.

VBA Function to List All Reports

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

Function dmwListAllReports() As String

On Error GoTo errHandler

Dim msg$

Dim rpt As AccessObject, dB As Object

Set dB = Application.CurrentProject

For Each rpt In dB.AllReports

Debug.Print rpt.Name

Next rpt

msg$ = "Reports listing complete"


dmwListAllReports = msg$

Exit Function


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

Resume procDone

End Function

How to Run the 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 ?dmwListAllReports and press Enter. The leading question mark is essential.

Your Support for dmw TIPS

If you’re going to make use of Tips in any of your professional or commercial work, then please consider making a payment in recognition of the time spent publishing this website.

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

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

To say how much you want to pay and to receive
a tax invoice for a GBP (£ sterling) contribution —


Thanks, in anticipation.

SSL Cerification


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