Validation Rules Help!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am still new to Access 2003 and my question is - When creating a table in
Design View, how would I set up the Validation Rule and Text so that users
can only enter the numbers 1, 2, 3, 4, or 5?

Also, if I wanted users to only enter numbers beginning with 43, how would I
set that up?

Your help is really appreciated. Thanks.
 
1 Or 2 Or 3 Or 4 Or 5 Or Is Null

Add the Is Null is you don't require the data.

Left,2 MyTxtBox = 43

Use that validation in the BeforeUpdate event of a form, not the table.
 
Validation rule: 1 Or 2 Or 3 Or 4 Or 5
Validation text: Just type in whatever you want it to say.

Regarding entering data that only begins with 43, I can't see the point of
this. Firstly, I assume it is text data, since I can't imagine any
circumstance under which 43, 430, 4300 and so on would be valid inputs but
the thousands of numbers in between wouldn't. If it is text, then it is
completely redundant to have 43 prepended to the field in every record in
the table. However, if you insist, the following validation rule will do
it:

Like "43*"
 

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