validation rule
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

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

Validation Rule

resolvedResolved · High Priority · Version 2007

replyReply Fri 3 Feb 2012, 12:14Delegate Katrina said...

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

For upcoming training course dates see: Pricing & availability

replyReply Fri 3 Feb 2012, 14:17Delegate Katrina said...

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)

replyReply Thu 29 Mar 2012, 10:23Trainer Rodney said...

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

replyReply Thu 29 Mar 2012, 10:31Trainer Rodney said...

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

Thu 5 Apr 2012: Automatically marked as resolved.

 

Please browse our web site to find out more about
microsoft access training course and other Microsoft training courses.

Access tip:

Undo Entries In Records

To Undo any entries or changes in records:

Hit the ESC key once for the current field

And ESC twice for current record

View all Access hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard