Validation Text not appearing

  • Thread starter Thread starter wersh
  • Start date Start date
W

wersh

I have a field for a last name. I have set this field to be required, and
entered the phrase: A last name must be entered. in the box next to
Validation Text. When I test this, by not entering a last name, I get the
Access default message, rather than the one I wanted. How do I fix this?
 
Wersh: Have you entered a Validation Rule? In that slot enter something
like "[LastName] Is Not Null" (no quote marks entered and use whatever your
field name actually is). Try that and see if your Validation Text works.
 
Thanks for responding. I copied what you had, without the quotes, and with
the actual field names , but no luck.

Robert J said:
Wersh: Have you entered a Validation Rule? In that slot enter something
like "[LastName] Is Not Null" (no quote marks entered and use whatever your
field name actually is). Try that and see if your Validation Text works.

wersh said:
I have a field for a last name. I have set this field to be required, and
entered the phrase: A last name must be entered. in the box next to
Validation Text. When I test this, by not entering a last name, I get the
Access default message, rather than the one I wanted. How do I fix this?
 
Robert is correct. The only way it will work is to set Required=No and
specify Is Not Null in your rule. If want your own error displayed for
zero-length strings, you might need to disable that property too and set
your rule to [LastName] Is Not Null And [LastName] <> "".

Access processes the Required property first, and if that is set to Yes and
the data is null, your rule and text will not be invoked. Access displays
its own message. I'm not 100% sure about the AllowZeroLengthString property,
but I would treat it the same way to be safe.

Robert J said:
Wersh: Try making the required field No, but leave the validation rule
and
text as I described. See if that works for you. I just tested this and
it
works for me.

wersh said:
Thanks for responding. I copied what you had, without the quotes, and
with
the actual field names , but no luck.

Robert J said:
Wersh: Have you entered a Validation Rule? In that slot enter
something
like "[LastName] Is Not Null" (no quote marks entered and use whatever
your
field name actually is). Try that and see if your Validation Text
works.

:

I have a field for a last name. I have set this field to be required,
and
entered the phrase: A last name must be entered. in the box next to
Validation Text. When I test this, by not entering a last name, I get
the
Access default message, rather than the one I wanted. How do I fix
this?
 

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

Similar Threads


Back
Top