I have a field on a form that I don't want users to leave blank. So in the On Click property of the exit button on that form, I put in
If IsNull(Me![Combo20]) Or Len(Combo20) = 0 Then
MsgBox "You must enter a payor!"
Else: DoCmd.Close
End If
This works fine under most circumstances. But if the user somehow hits the start new record button (or if they get to the record after end of the recordset) and then they try to exit, they are unable to do so (because the entire form is blank).
Is there some way to solve this? Or is it an insurmountable design problem? Any help would be appreciated...just keep in mind that my coding skills are at the beginner level (or below!)
Thanks!
If IsNull(Me![Combo20]) Or Len(Combo20) = 0 Then
MsgBox "You must enter a payor!"
Else: DoCmd.Close
End If
This works fine under most circumstances. But if the user somehow hits the start new record button (or if they get to the record after end of the recordset) and then they try to exit, they are unable to do so (because the entire form is blank).
Is there some way to solve this? Or is it an insurmountable design problem? Any help would be appreciated...just keep in mind that my coding skills are at the beginner level (or below!)
Thanks!