Validation Rules

Charlie2

Registered User.
Local time
Today, 22:47
Joined
Mar 28, 2002
Messages
79
I am trying to set up a validation rule for a field of data. I am using the following rule:

Like"[ABC]###"

I want the user to be able to enter 3 letters followed by 3 digits, though whenever I enter data like ABC123 I get the error message.

Why is this?

Thanks Charlie
 
in the design veiw of the table change the filed size to 6 and add the following to the Input mask AAA000

If you want to ensure uppercase add > to the Format

HTH
 
Search help for Input Masks and then look for "Create an input mask to control how data is entered in a field or control".

hth,
Jack
 
Already Done

Thanks anyway boys.

Like"[A-Z][A-Z][A-Z]###"


Voila.
 
If it works for you then go for it! I would be tempted to use the input mask as it is easier to implement, but that is just my opinion...

Jack
 
Jack,
I was told the input mask method changes the behaviour of the edit keys (backspace,delete,etc) I was told it can confuse the user.

Charlie
 
Hmmm. You are the programmer and you know what your client requires so I say give them what they want as they are paying the bills. There are a lot of ways to skin a cat so use the method that works best for you and your client...

Jack
 
Questioning

I am not questioning you superior knowledge Jack :)
I acknowledge you know far more than I do, its just someone told me to use that method.

Charlie
 
Charlie -

Please don't misunderstand me. I doubt that I know much more than you, but what I said is true. There are lots of ways to solve your problem and if this works for you then I am sincere in saying use it. In some things there are 'better' ways to do something but little things like this are not important enough to worry about. Now if you had repeating groups in one of your tables I would strongly suggest you normalize it but for things like this I really believe in doing what works best for you. There was no criticism meant in my last post. I do trust your judgment and ability to solve the problem at hand and you have done so.

Jack
 
No Problem

No probs jack, just trying to avoid any misunderstandng.

Charlie
 
Me too, Charlie!

Thanks for the reply and continued success with your project!

Jack
 

Users who are viewing this thread

Back
Top Bottom