Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Urgent..Change ODBC error message

Status
Not open for further replies.

riarc

Programmer
Dec 6, 2001
44
US
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top