Hi,
Give this a try:
'************************
Dim chkno As Integer 'hold checkbob count
Dim Answer As Variant
Dim ctl As Control
chkno = 0
For Each ctl In Controls
If ctl.ControlType = acCheckBox Then
If ctl.Value = True Then
chkno = chkno + 1
End If
End If
Next
If chkno <= 0 Then
Answer = MsgBox("There are NO Check
Boxes Selected" & Chr(13) & Chr(10) _
& "You MUST Select at least 1 " & Chr(13) & Chr(10) _
& "And a Maxium of 5 to Continue", vbOKOnly & vbCritical, "No Criteria Selected")
If Answer = vbOK Then
chkno = 0
Exit Sub
End If
End If
If chkno > 5 Then
Answer = MsgBox("Too many selections checked", vbOKOnly & vbCritical, _
"Too Many Criteria Checked")
If Answer = vbOK Then
chkno = 0
Exit Sub
End If
End If
' *****************************
I only used a vbOK in the msgbox, use whatever is
appropriate for your app.
HTH
Skip