How to loop through closed Forms?

  • Thread starter Thread starter deko
  • Start date Start date
D

deko

How do I loop through all CLOSED forms in my Access 2007 accdb?

This only works for OPEN forms:

Dim frms as Forms
Dim frm as Form

For Each frm in frms
Debug.Print frm.Name
Next frm

Thanks
 
deko said:
How do I loop through all CLOSED forms in my Access 2007 accdb?

This only works for OPEN forms:

Dim frms as Forms
Dim frm as Form

For Each frm in frms
Debug.Print frm.Name
Next frm

Thanks

Look in the help files for 'AllForms' collection. Alternatively, there's
also Containers & Documents collections which you can obtain with this:

CurrentDb.Containers("Forms").Documents...
 
Look in the help files for 'AllForms' collection. Alternatively, there's
also Containers & Documents collections which you can obtain with this:

CurrentDb.Containers("Forms").Documents...

AllForms is the ticket...

Dim obj As AccessObject
For Each obj In CurrentProject.AllForms
strFrm = obj.Name
Next obj
 
deko said:
How do I loop through all CLOSED forms in my Access 2007 accdb?

This only works for OPEN forms:

Dim frms as Forms
Dim frm as Form

For Each frm in frms
Debug.Print frm.Name
Next frm

Thanks
 
"deko" <[email protected]> ha scritto nel messaggio
Look in the help files for 'AllForms' collection. Alternatively, there's
also Containers & Documents collections which you can obtain with this:

CurrentDb.Containers("Forms").Documents...

AllForms is the ticket...

Dim obj As AccessObject
For Each obj In CurrentProject.AllForms
strFrm = obj.Name
Next obj
 
Back
Top