I am using the following code to have a pop up box come up if a field is left blank reminding the user to fill out that field, if the field is filled in it should save the record and then go to a new record, but when the field is blank the pop up is displayed but when you click on OK it just goes to a new record skipping the cancel string....can anyone help me?
Code:
Private Sub Command34_Click()
If (IsNull(other)) And [Reason] = "other" Then
MsgBox "Please provide 'Other' explanation", vbExclamation
Cancel = True
End If
If (IsNull(other)) And [Reason] = "Not cd related" Then
MsgBox "Please provide 'Not CD Related' explanation", vbExclamation
Cancel = True
End If
DoCmd.Save
DoCmd.GoToRecord , , acNewRec
End Sub