validation rule

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Access Training and help » Validation Rule

Validation Rule

resolvedResolved · High Priority · Version 2007

Katrina has attended:
Access Introduction course
Access Intermediate course

Validation Rule

Hello

On my form, the code being entered (which is made up of letters and numbers) is 8 digits long. If someone enters less or more than 8 digits, Validation Text say 'Please enter 8 digits' or something like that. My question is, what do I write in the the Validation Rule for 8 digits only?

Thank you

RE: Validation Rule

The digits being entered on the form is 8 digits long e.g. TS100100

If someone enters less or more than 8 digits e.g. TS100 or TS100100100, they have entered the code incorrectly. So I will use the Validation Text to flash up an error message saying 'Please enter 8 digits only'. But in order for the Validation Text to work, I need to write in a Validation Rule. I want the person entering digits on the form to only be able to ever enter 8 digits. I don't know what Validation Rule to enter?

8?
=8?
Between 8 and 8?
Like "[8]?

I hope that's clearer. Many thanks :o)

RE: Validation Rule

Hello Katrina,

Thank you for your question regarding setting up validation rules in Access.

I came across this post today which does not appear to have been answered by anyone. Our sincere apologies for this oversight.

Here is what you need to type in as a validation rule for ensuring a user only enters 8 digits into a particular field.

Click in the validation rule properties and type:

Like "????????"

Enter the appropriate text message into the validation text section then save the changes and test.


I hope this resolves your question. If it has, please mark this question as resolved.

If you require further assistance, please reply to this post. Or perhaps you have another Microsoft Office question?

Have a great day.
Regards,

Rodney
Microsoft Office Specialist Trainer

RE: Validation Rule

Hello Katrina,

Thank you for your question regarding setting data validation rules in Access.

To force a user to enter a specific number of digits into a field do the following:

Enter the following into the Validation Rule:

Like "????????"

This rule forces the user to enter 8 digits only.

Then enter the Validation text and test to ensure it works.

I hope this resolves your question. If it has, please mark this question as resolved.

If you require further assistance, please reply to this post. Or perhaps you have another Microsoft Office question?

Have a great day.
Regards,

Rodney
Microsoft Office Specialist Trainer

RE: Validation Rule

Thank you

RE: Validation Rule

Thank you so much

Thu 5 Apr 2012: Automatically marked as resolved.


 

Access tip:

Dsum

You can create percentage values based on individual products / items by using a Dsum function (used with a grouped query)

[Each value column] / Dsum[field:total for the column needed to be calculated],[tablename]

View all Access hints and tips


Server loaded in 0.08 secs.