i need to know how to do this:
if all checkbox on form are unchecked then msgbox("please select one")
else goto form2
Printable View
i need to know how to do this:
if all checkbox on form are unchecked then msgbox("please select one")
else goto form2
As long as they're bi-state checkboxes:
VB Code:
If Not CBool(Check1.Value Or Check2.Value Or Check3.Value) Then MsgBox "Please Select One" Else ' Go to Form2 End If
if check1.value=0 Or check2.value=0 then
MsgBox "Please Select...... "
end if
Taking both examples and using VB Intrisic Constants:
VB Code:
If Check1.Value = [b]vbUnChecked[/b] And Check2.Value = vbUnChecked And Check3.Value = vbUnChecked Then MsgBox "Please Select One", vbOkOnly + vbInformation, App.EXEName Else ' Go to Form2 End If