Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Validation Rule & Text

Validation Rule & Text

Validation Rule & Text


On a particular date field I have a date input mask which is a medium date (ex: 01-Jan-05).  This is the format I want for the field.  It works fine but when the format is not followed MS Access give its own error message.  

How would I go about creating a Validation Rule for the format I want so that the Validation text I want is what appears to the user?

Thanks in advance for your help!


RE: Validation Rule & Text


I am not sure if I understand the specific problem...


when the format is not followed MS Access give its own error message.

Do you mean that if the end user does not follow the dd-mmm-yy format they get an error?

You can use an InputMask which controls the way data is inputed which can be different than the way data is displayed.

You can programmatically change / control the mask...
Me.YourDateField.Format = "mmm-dd-yyyy" or "dd-mmm-yy" depending on conditions.

Lastly, you can use a text box, use full control with the VBA coding, and then once satstified, update the date field which could be a hidden text box.  This way, you can control error messages, etc.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close