Disable all controls on a tab control page

S

StuJol

i have a form in Access2003 which has a tab control on it. I have about 10
pages on the tab control, page1, page2 etc...

Is there a way to disable all the controls on a single tab page? rather then
having to list all the individual fields?
 
A

Allen Browne

Loop through the Controls collection of the Page. See if the control has an
Enabled property (e.g. labels don't), and set it accordingly.

For a page named Page1, it would start like this:
Dim ctl As Control
For Each ctl in Me.[Page1].Controls
...
 
Top