Monday, July 15, 2013

Get List of Forms in Access Database

2. 

Linq Adams via AccessMonster.com
P: n/a
From the task you've set yourself, you might want to look at the built in
Documenter. Goto Tools - Analyze - Documenter.

You can pick what you want included in the report ,using the "Options" button.
You can include such things as controls, relationships and so forth.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200808/1
Aug 14 '08 #4

1. from http://stackoverflow.com/questions/11576352/retrieve-list-of-forms-in-an-access-database

Retrieve list of forms in an Access database

How can I retrieve a list of all forms in a MS-Access database?
To retrieve a list of all tables I use this:
For Each TDef In CurrentDb.TableDefs
    If Left(TDef.Name, 4) <> "MSys" And Left(TDef.Name, 7) <> "~TMPCLP" Then
        Debug.Print TDef.Name
    End If
Next
Also see this issue.
But I can't do this for forms.
share|improve this question


You can use AllForms for a list of names. These are not instances of forms, just names.
Sub ListForms()
Dim frm As Object
Dim LiveForm As Form

    For Each frm In CurrentProject.AllForms
        Debug.Print frm.Name
        ''To use the form, uncomment
        ''DoCmd.OpenForm frm.Name, acViewDesign
        ''Set LiveForm = Forms(frm.Name)
        ''Do not forget to close when you are done
        ''DoCmd.Close acForm, frm.Name
    Next
End Sub
share|improve this answer