laporta
asked on
Validation Rule works fine in Access 2000 but fails in Access 2002
I have a simple validation rule (like '?????') on a field where the users must enter a 5 character serial number made up of just letters (i.e. CRCPD). This works fine on boxes with win2k pro and access 2000 however, I just got a user with a new box that has winxp and access 2002 and it will not work. Access 2002 changed the statement to Alike '?????' and it fails every time.
It should work - can you manually change it back? Also make sure that NameAutocorrect is turned off (Tools->Options->General).
ASKER
I totally agree it should work...it does work with the older access but not with 2002. It will not pass validation when I enter the 5 characters. Even on already created records. It seems fine to enter and exit the field (I can click in and out of the field without problems)but as soon as I try to edit the field (ie. delete a letter and then retype it) it will no longer pass validation and I can't get out of the field.
There are two other event procedures that take place on that field 'on Change' (I lock certain other fields) and and 'on key press' (I am looking to see it the escape key is pressed) but I don't see how that would have an impact.
There are two other event procedures that take place on that field 'on Change' (I lock certain other fields) and and 'on key press' (I am looking to see it the escape key is pressed) but I don't see how that would have an impact.
ASKER
I am at a loss...if I enter 5 "?????" in the field than it passes validation, any other characters and it doesn't....so is my syntax wrong? are question marks no longer wild characters? What should I use?
Aha, the Alike operator is ADO. Try changing it to:
Alike "_____"
i.e. 5 underscore characters. You could also try adding a reference to DAO and removing the ADO reference, then changing it back to Like.
Alike "_____"
i.e. 5 underscore characters. You could also try adding a reference to DAO and removing the ADO reference, then changing it back to Like.
ASKER
Thanks for the tip, the underscores did work, it now passes validation, however, so does entering less than 5 characters, but if I change to 4 underscores or less nothing will pass validation again.
I forgot to mention that the table is a SQLServer table.
I forgot to mention that the table is a SQLServer table.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
No..it didn't work...I ended using A different workaround...thanks anyway