Forum Discussion
SuperYaoms
Aug 09, 2024Copper Contributor
MS Access- Validation for post codes
Please help. I've been on this for 3-4 days now!
the postcodes are 4 digits... (data is in short text)
I'm trying to set up a validation rule : is null or like "####" to only enable number input or leave it blank.
no matter what I put in... numbers, letters, space... i'm getting the validation msg I set up (please enter 4 digit code)
even when I try to change the existing data (short text) same thing...
I got an error msg when trying to save this that existing data doesn't match (seriously ... just numbers in short text form)
I'm going outta my mind pls help
4 Replies
Sort By
- XPS35Iron ContributorOr if you insist on being it a text field, use an input mask: 0000
- SuperYaomsCopper ContributorYup just resorted to input mask.... 0000;;####
Thank you!
- XPS35Iron ContributorMake it a numeric field (integer) with a rule like: >=1000 And <=9999
- Gerrit_ViehmannCopper Contributor
XPS35 A text field would allow zip codes with a leading zero, and you don't have to remember to format it in output forms or reports.
If, for whatever reason, you don't like to have an input rule, the validation rule could reference any field in the current record. E.g.:Cheers!