Turning Off Default Validation Msg

  • Thread starter Thread starter Brennan
  • Start date Start date
B

Brennan

Hello:

I have a table in which I have put some validation rules
and validation text. I have also put the same rules and
text on the fields on a form attached to the table.

While testing the database, Access2K diplays the default
system message for the missing data instaed of my message.

How can I fix this?

Thanks
Brennan
 
Might help if we all knew what message (and number) it was
displaying. Some messages are easier to supress than
others...
 
Thanks Gina:

The message reads

The field tblContracts_Saledate cannot contain contain a
Null value because the required property for this field is
set to True. Enter a Value in this field.

My message reads

Please Enter a Sale Date

There is no message number displayed.

Thanks
Brennan
 
The message number is 3314. Try writing code to trap that error message and
place your message there. Something like the below on the On_Error or the
form...

Dim strMsg As String

If DataErr = 3314 Then
Response = acDataErrContinue
strMsg = "You MUST enter an " _
& "Sale Date in order to continue!"
MsgBox strMsg
DoCmd.GoToControl "txtSaledate (or whatever your filed name is)"
End If
 
Back
Top