I have something I haven't come across before or at least I haven't noticed. I may have to check all my other forms now. Anyway, I have this coded behind a save button:
Code:
If Me.Dirty Then
If IsNull(Me.txtReason) Then
MsgBox "Please Enter A Reason.", vbInformation, "Requirement"
Me.txtReason.SetFocus
Exit Sub
End If
If MsgBox("Save Changes?", vbYesNo, "Save") = vbYes Then
DoCmd.RunCommand acCmdSaveRecord
Me.cmbCustomer.SetFocus
Exit Sub
Else
Me.cmbCustomer.SetFocus
Exit Sub
End If
End if
So it works fine sometimes. If I don't type anything into the txtReason field and click the save button it will execute as it should and prompt me to make sure to type something into the txtReason field. But if I type into the txtReason field and then backspace but leave the focus on that field, meaning the cursor doesn't leave that field, it will still allow me to save the record even though the txtReason field is blank.
Does anyone know how to fix this?