[AccessD] Iterate Through All Forms and Control

Dan Waters dwaters at usinternet.com
Tue Dec 9 18:13:12 CST 2008


Hi Rocky,

Take a look at CurrentProject.AllForms.  Might help?

Dan

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin at
Beach Access Software
Sent: Tuesday, December 09, 2008 5:40 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Iterate Through All Forms and Control

Dear List:
 
I need to iterate through all the forms and controls in a db.  I did this
before but can't find the code.
 
So I started with 

MsgBox Forms.Count
Dim frm As Form
Dim ctl As Control
For Each frm In Forms
    For Each ctl In frm.Controls
        MsgBox frm.Name & " " & ctl.Name
    Next ctl
Next frm
 
but this only does the open forms - Forms.Count=1.
 
I can't remember how to get all the forms.  Does anyone have a snip for this
 
MTIA
  	
	
 

Rocky Smolin

Beach Access Software

858-259-4334

www.e-z-mrp.com <http://www.e-z-mrp.com/> 

www.bchacc.com <http://www.bchacc.com/> 

 

 


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list