I have an access form that is updating a table on my sql server. One of the fields is not null, when the user attempts to put a null value there I get the standard ODBC error message. How can I change this message to something that the user can understand?
You could add code to the On Exit event of the text box that displays a message and cancels the exit if the text box is null.
Private Sub txtName_Exit(Cancel As Integer)
If IsNull(Me.txtName) Then
MsgBox "You must enter a name.", vbOKOnly, "Null Name"
Cancel = True
End If
End Sub Terry L. Broadbent FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.