I need to check some criteria for some textboxes on my form (containing 5 subforms). I have set the tag property to do this and I want to loop through the control collection and verify some things. I know how to achieve this with my main form controls, but how do I include all of the controls on the subforms (which are themselves controls). I've looked into forms collections and parent properties, but nothing seems to fit. This is what I have:
For each frm in Forms
for each ctl in frm
if ctl.tag="whatever" then
blah blah
exit sub
endif
next ctl
next frm
But since I only have the Main form open, that seems to be the only form in my Forms collection. HELP! I know this code can be written neatly!!
For each frm in Forms
for each ctl in frm
if ctl.tag="whatever" then
blah blah
exit sub
endif
next ctl
next frm
But since I only have the Main form open, that seems to be the only form in my Forms collection. HELP! I know this code can be written neatly!!