I have a form with multiple checkbox options available. I don't want the user to be able to continue to the next form without one of these options checked. There is a N/A option checkmark available as a minimum requirement to continue. I just can't get the code to work right for this. No matter whether items are checked or left blank, it lets the user continue to the next form.
Here is what I came up with so far...
If IsNull(A_.Value) Then
Resume
ElseIf IsNull(B_.Value) Then
Resume
ElseIf IsNull(C_.Value) Then
Resume
ElseIf IsNull(E_.Value) Then
Resume
ElseIf IsNull(N_A_.Value) Then
DoCmd.CancelEvent
Beep
MsgBox "One of these is required to be checked. If you do not require access to classified, please check the N/A box.", , "Classified"
N_A_.SetFocus
I've got the Else, DoCmd.RunMacro and End If functions correct, just need to know how to write this so it doesn't let a blank form be passed up.
Thanks,
Drew
Here is what I came up with so far...
If IsNull(A_.Value) Then
Resume
ElseIf IsNull(B_.Value) Then
Resume
ElseIf IsNull(C_.Value) Then
Resume
ElseIf IsNull(E_.Value) Then
Resume
ElseIf IsNull(N_A_.Value) Then
DoCmd.CancelEvent
Beep
MsgBox "One of these is required to be checked. If you do not require access to classified, please check the N/A box.", , "Classified"
N_A_.SetFocus
I've got the Else, DoCmd.RunMacro and End If functions correct, just need to know how to write this so it doesn't let a blank form be passed up.
Thanks,
Drew