cycling thru controls on a form

T

Ted

Hi all,

I have several forms with a lot of check boxes on it. Each checkbox
represents a form that will print out if its corresponding check box is
checked. instead of writing an if...then statement for each checkbox i would
rather write code that will automatically check all checkbox controls on the
form to see if its checked. i think i can do this with For...Each?

Help please

Thanks in Advance
Ted
 
D

Douglas J. Steele

Dim ctlCurr As Control

For Each ctlCurr In Me.Controls
If TypeOf ctlCurr Is CheckBox
' Do your checking here...
End If
Next ctlCurr
 
Top