A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to loop through closed Forms?



 
 
Thread Tools Display Modes
  #1  
Old March 8th, 2010, 09:35 PM posted to microsoft.public.access
deko[_2_]
external usenet poster
 
Posts: 5
Default How to loop through closed Forms?

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
  #2  
Old March 8th, 2010, 09:51 PM posted to microsoft.public.access
Banana[_2_]
external usenet poster
 
Posts: 214
Default How to loop through closed Forms?

deko wrote:
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...
  #3  
Old March 8th, 2010, 09:54 PM posted to microsoft.public.access
PieterLinden via AccessMonster.com
external usenet poster
 
Posts: 307
Default How to loop through closed Forms?

deko wrote:
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


Probably the AllForms collection

Public Sub ListAllForms()
Dim aobj As Object
For Each aobj In CurrentProject.AllForms
Debug.Print aobj.name
Next aobj
End Sub

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/201003/1

  #4  
Old March 10th, 2010, 01:12 AM posted to microsoft.public.access
deko[_2_]
external usenet poster
 
Posts: 5
Default How to loop through closed Forms?

On Mar 8, 1:51*pm, Banana Banana@Republic wrote:
deko wrote:
How do Iloopthrough allCLOSEDformsin my Access 2007 accdb?


This only works for OPENforms:


Dim frms asForms
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...


AllForms is the ticket...

Dim obj As AccessObject
For Each obj In CurrentProject.AllForms
strFrm = obj.Name
Next obj
  #5  
Old March 13th, 2010, 05:36 PM posted to microsoft.public.access
De Jager
external usenet poster
 
Posts: 393
Default How to loop through closed Forms?


"deko" wrote in message
...
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


  #6  
Old March 16th, 2010, 02:00 PM posted to microsoft.public.access
valeria del colle
external usenet poster
 
Posts: 6
Default How to loop through closed Forms?


"deko" ha scritto nel messaggio
...
On Mar 8, 1:51 pm, Banana Banana@Republic wrote:
deko wrote:
How do Iloopthrough allCLOSEDformsin my Access 2007 accdb?


This only works for OPENforms:


Dim frms asForms
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...


AllForms is the ticket...

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

  #7  
Old March 17th, 2010, 01:28 PM posted to microsoft.public.access
joelgeraldine
external usenet poster
 
Posts: 201
Default How to loop through closed Forms?

eryuikllmmùùù

"deko" a écrit dans le message de groupe de discussion :
...
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


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:50 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.