How to suppress a default Ms Access error message on a form
I have been observing for quite some time now , users may enter some wrong data on a form un intentionally and get a very frightening message like below. Now I think its time to act on it any idea there?
I want to suppress those MS Access massages with user friendly messages like below:
I want to suppress those MS Access massages with user friendly messages like below:
Private Sub txtDatesTesting_BeforeUpdate(Cancel As Integer)
On Error GoTo Err_Handler
If (Me.txtDatesTesting <> Date) Then
Beep
MsgBox " Please note that what you have entered is not a valid correct dates", vbExclamation, " Wrong Data Capturing"
Cancel = True
Exit Sub
End If
Exit_txtDatesTesting_BeforeUpdate :
Exit Sub
Err_Handler:
MsgBox Err.Number & Err.Description, vbExclamation, "Error"
Resume Exit_txtDatesTesting_BeforeUpdate
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.