Hi Steve,
Another suggestion for you. You could use the tag value of the controls to
specify which group they belong to (i.e. you said some will be visible
whilst others are not). We'll call them Group1 and Group2.
1. Place an option group frame with a couple of option controls (radio
buttons or check boxes, etc, whatever) on your form.
2. For each control that you want to appear in Group 1, place the text
"Group1" (no quotes) in the controls Tag property.
3. In the AfterUpdate event of the option group frame you placed on your
form, place the following:
Private Sub fraYourFrame_AfterUpdate()
Dim ctl As Control
Dim strSelected As String
Dim strNotSelected As String
Select Case fraYourFrame
Case 1 'Where the option with value 1 is for Group1
strSelected = "Group1"
strNotSelected = "Group2"
Case 2 'Where the option with value 2 is for Group2
strSelected = "Group2"
strNotSelected = "Group1"
End Select
For Each ctl In Me.Controls
If ctl.Tag = strSelected Then
ctl.Visible = True
ElseIf ctl.Tag = strNotSelected Then
ctl.Visible = False
End If
Next ctl
End Sub
NB: A control can't be set to not visible if it has the focus so you may
want to keep that in mind.
HTH.
Jamie