View Full Version : Validation Rule - Table


canjfn
01-29-2005, 12:40 PM
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.

sportsguy
01-29-2005, 02:13 PM
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

neileg
01-31-2005, 05:11 AM
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.