View Full Version : Form Groups??


spinkung
02-27-2009, 05:52 AM
Hi All,

Can anyone tell me if it's possble to hide entire form groups from VBA.

I have several controls on a form which i have grouped. I want to be able to use something like : form.group.visible = false/true

Otherwise i'll have to do each control which is a bit of a time burner.

Many Thanks.

dkinley
02-27-2009, 05:58 AM
You can use control tags to do this ...

For instance in one group of controls name the tag 'Group1' and another 'Group2' then loop through the controls, evaluate the tag and set the visibility to False.


Dim ctl As Control

For Each ctl In Me.Controls
If ctl.Tag = "Group1" Then
ctl.Visible = False
ElseIf ctl.Tag = "Group2" Then
ctl.Visible = False
End If
End Select
Next


I think I have that right ...
-dK

spinkung
02-27-2009, 06:07 AM
spot on. Thankyou. :)

dkinley
02-27-2009, 06:58 AM
You bet ... good luck!

-dK