Validation Rule not working in table

G

Guest

I want to check for null values in a text field of a form. The text field is
blank (i.e. no default value). I've tried using Is Not NUll as the
validation rule, but it does not work. My validation text never appears.
When I try to save the record, I get the message "you can't go to specified
record". Also, If I use Is Null as the validation rule, I still don't get my
validation text, and the record is saved.
 
G

Guest

I would suggest not using Validation rules. Instead, you can use the Before
Update event of the control or the form, depending on what behaviour you want.

If IsNull(Me.MyTextField) Then
MsgBox "No Value Entered for this Field"
Cancel = True
End if
 
G

Guest

I integrated your code into my Save record event, and it worked great. (When
I tried to use the code in the Update event, I still got the same message
"you can't go to specified record") Still at a lost as to why the "Is Not
Null" validation rule does not work - but I'm moving on.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top