G
Guest
Good Morning all,
On a form there is a combo box(Type), limited to list. There is also a
set of 10 check boxes (A - J). If a specific selection is made on the combo
box, the user must select at least two of the check boxes. Here is what I am
working with, on the before update event:
Dim X As Integer
X = 0
If Me.Check_A = True Then X = X + 1
If Me.Check_B = True Then X = X + 1
If Me.Check_C = True Then X = X + 1
If Me.Check_D = True Then X = X + 1
If Me.Check_E = True Then X = X + 1
If Me.Check_F = True Then X = X + 1
If Me.Check_G = True Then X = X + 1
If Me.Check_H = True Then X = X + 1
If Me.Check_I = True Then X = X + 1
If Me.Check_J = True Then X = X + 1
If Me.Type = 13 And X <= 1 Then
MsgBox ....
Cancel = True
Resume Exit_Update
End If
Any suggestions as to why this doesn't work, or a better answer?
Thank you,
Renee
On a form there is a combo box(Type), limited to list. There is also a
set of 10 check boxes (A - J). If a specific selection is made on the combo
box, the user must select at least two of the check boxes. Here is what I am
working with, on the before update event:
Dim X As Integer
X = 0
If Me.Check_A = True Then X = X + 1
If Me.Check_B = True Then X = X + 1
If Me.Check_C = True Then X = X + 1
If Me.Check_D = True Then X = X + 1
If Me.Check_E = True Then X = X + 1
If Me.Check_F = True Then X = X + 1
If Me.Check_G = True Then X = X + 1
If Me.Check_H = True Then X = X + 1
If Me.Check_I = True Then X = X + 1
If Me.Check_J = True Then X = X + 1
If Me.Type = 13 And X <= 1 Then
MsgBox ....
Cancel = True
Resume Exit_Update
End If
Any suggestions as to why this doesn't work, or a better answer?
Thank you,
Renee