I have a very strange issue. I have created various checkboxes to be associated with departmental groups and a main checkbox that unchecked it will check the other checkboxes to see if any are checked and if so throw an message box. the problem is that I have created 7 additional checkboxes and added the code but it throws the error if I try to click on the checkboxes themselves.. Here is my code that works:
Private Sub blnallowidcheckout_BeforeUpdate(Cancel As Integer)
If blnbstseai.Value Or blnbstsmts.Value Or blnbstsdb.Value Or blnbstsests.Value _
Or blnbsmo.Value Or blnbsstaff.Value Or blnbsabap.Value Or blnbschangesup.Value _
Or blnbsfinance.Value Or blnbscommkt.Value Or blnbssupply.Value Or blnsstools.Value _
Or blnsseim.Value Or blnbsqrrc.Value Then
MsgBox "There cannot be any check boxes enabled for any groups to disable this flag. Please uncheck the checkboxes current enabled before proceeding."
Cancel = True
Else
End If
End Sub
When I add the following to it, is when it screws up and once it throws the error if I tried to uncheck any checkboxes it throws the same error.
blnsseim.Value Or blnbsqrrc.Value or _
blniocts.Value Or blnionts.Value Or blnioeurope.Value Or _ blnioasia.Value Or blniobrazil.Value Then
MsgBox "There cannot be any check boxes enabled for any groups to disable this flag. Please uncheck the checkboxes current enabled before proceeding."
Cancel = True
Else
End If
End Sub
Any help would be great!
Private Sub blnallowidcheckout_BeforeUpdate(Cancel As Integer)
If blnbstseai.Value Or blnbstsmts.Value Or blnbstsdb.Value Or blnbstsests.Value _
Or blnbsmo.Value Or blnbsstaff.Value Or blnbsabap.Value Or blnbschangesup.Value _
Or blnbsfinance.Value Or blnbscommkt.Value Or blnbssupply.Value Or blnsstools.Value _
Or blnsseim.Value Or blnbsqrrc.Value Then
MsgBox "There cannot be any check boxes enabled for any groups to disable this flag. Please uncheck the checkboxes current enabled before proceeding."
Cancel = True
Else
End If
End Sub
When I add the following to it, is when it screws up and once it throws the error if I tried to uncheck any checkboxes it throws the same error.
blnsseim.Value Or blnbsqrrc.Value or _
blniocts.Value Or blnionts.Value Or blnioeurope.Value Or _ blnioasia.Value Or blniobrazil.Value Then
MsgBox "There cannot be any check boxes enabled for any groups to disable this flag. Please uncheck the checkboxes current enabled before proceeding."
Cancel = True
Else
End If
End Sub
Any help would be great!