Validation Rule - Table

canjfn

Registered User.
Local time
Today, 01:40
Joined
Apr 24, 2001
Messages
28
I have field (SupplierID) set as Text and the field limited to 5.

I want the users to enter the first three digits as text e.g "ABC" and the last 2 digits as numerics e.g "01", thus the input would be "ABC01", I can validate it to 5 digits but cannot get the validation working on the numerics, e.g users can enter "ABCDE", Am i correct in thinking its because my field is set as text ?, is there a simple way to do this, thankyou.
 
A suggestion

probably the best answer is to use a query in a form, and in the before update property of the FORM, use some code to check the validity of the entry in the text box. If error on right([fieldname],2) as value, you have your answer.

sportsguy
 
You could use an input mask, LLL00 would force the format you want. Be aware that this will require a valid value to be input. I rarely like to restrict data at a table level, preferring to handle things in the form. However, my experience has been that input masks work best at table level.
 

Users who are viewing this thread

Back
Top Bottom