I'm trying to give a warning before the user takes action. I put a message box giving an option to continue or to cancel. But that's as far as I know how to go. The cancel button does not do anything. How do I make the cancel button cancel any action? Here's the code:
Private Sub Command37_Click()
On Error GoTo Command37_Click_Err
MsgBox "OK will vacate this spot, or press CANCEL", vbOKCancel
VacatedDate = Date
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryJobPositionNumbersVacate", acViewNormal, acEdit
DoCmd.SetWarnings True
DoCmd.Close , ""
Command37_Click_Exit:
Exit Sub