How do I make checkboxes required?

S

Star Taylor

I have a series of checkboxes on my form. I need the user to have clicked in
each one of them to verify that step was taken before being allowed to close
the screen. I selected yes on the required area of the master table, but it's
still not enforcing the requirement.

Any help is appreciated.

(p.s. I don't know VB)

Thanks!

Star Taylor
 
M

mray29

You can check the values of each checkbox in the Unload event of the form. If
any are not checked (are either Null or value = 0) then set Cancel = 1, which
will prevent the form from closing.

Private Sub Form_Unload(Cancel As Integer)
If IsNull(Me.Check0) Then
Cancel = 1
Msgbox "Checkbox 1 is empty"
End If


End Sub
 
P

Pete D.

Please don't take this wrong but wouldn't you be able to test other things
in the screen and limit extra check boxes required to make sure they took
those actions? Yes there are situations where manual action not automated
where the check boxes may be needed, but just throwing out a thought.
 
S

Star Taylor

Wouldn't that be easy? LOL. The screen only has check boxes. The user must
verify with a check in each box that each step was taken before closing the
form.

I appreciate any an all feedback from the pro's!

Thanks!
 
Top