S
Simon
I have the followiung code on a close button, What i want to do the
close buttone to do is that it will only close if 'Hot Tub Order' Or
'Chemical order' YES/NO Tick button is clicked. If one of them is not
clicked i want it to a message to tell me and for the form not to
close.
My code brings up the message if box is not ticked but it still closes
the form
Can any one help
Private Sub cmdCLose_Click()
If Me.ChemicalOrder.Value = False And Me.HotTubOrder.Value = False Then
MsgBox "Please Select Chemical or Hot Tub Order", vbExclamationm
End If
On Error GoTo Err_Command184_Click
DoCmd.Close
Exit_Command184_Click:
Exit Sub
Err_Command184_Click:
MsgBox Err.Description
Resume Exit_Command184_Click
End Sub
close buttone to do is that it will only close if 'Hot Tub Order' Or
'Chemical order' YES/NO Tick button is clicked. If one of them is not
clicked i want it to a message to tell me and for the form not to
close.
My code brings up the message if box is not ticked but it still closes
the form
Can any one help
Private Sub cmdCLose_Click()
If Me.ChemicalOrder.Value = False And Me.HotTubOrder.Value = False Then
MsgBox "Please Select Chemical or Hot Tub Order", vbExclamationm
End If
On Error GoTo Err_Command184_Click
DoCmd.Close
Exit_Command184_Click:
Exit Sub
Err_Command184_Click:
MsgBox Err.Description
Resume Exit_Command184_Click
End Sub