I have a form that is set to display a message box for each field that contains a null value when left blank. On my save button I added code to suppress the ever annoying 2501 run time error....unfortunately even if it runs into an error is still displays my "You saved me!" message - which obviously it shouldn't as it won't let you save it until you enter additional information. Any suggestions on how to get the message box of "You saved me!" to only display if there is NO error? here is my code;
Private Sub Command37_Click()
On Error GoTo ErrHand
DoCmd.RunCommand acCmdSaveRecord
MsgBox "You Saved Me!"
EndIt:
Exit Sub
ErrHand:
Select Case Err.Number
Case 2501
Resume Next
Case Else
MsgBox Err.Number
Resume EndIt
End Select
End Sub