Change Validation Rule Msgbox (1 Viewer)

Steve C

Registered User.
Local time
Yesterday, 18:08
Joined
Jun 4, 2012
Messages
119
TextBox1 Validation Rule is

>=0 And <21

I would like to replace the error message

" The value you entered doesn't meet the validation rule...."

I made a start with the OnUpdate Event

If Me.TextBox1 <= 1 Then
Msgbox "Whoops..."
Else
End If

But, although my message box appears, (nothing else does) the Validation Rule is ignorred and then zero entry causes an error.

So, I'm guessing, my If Statement has to catch the whole Validation (somehow). Am I on the right lines?
 

boblarson

Smeghead
Local time
Yesterday, 18:08
Joined
Jan 12, 2001
Messages
32,059
1. I only let users interact with forms so I have a Before Update event.

2. I validate in that Before Update event so I can easily cancel things and give my own message.

If you are using validation rules in tables, you can put your own custom message in the Validation Text property.
 

missinglinq

AWF VIP
Local time
Yesterday, 21:08
Joined
Jun 20, 2003
Messages
6,420
...If you are using validation rules in tables, you can put your own custom message in the Validation Text property...

You can do the same thing at the Form Level, as well.

Linq ;0)>
 

Users who are viewing this thread

Top Bottom