Solved

Validation Rule works fine in Access 2000 but fails in Access 2002

Posted on 2004-09-22
7
175 Views
Last Modified: 2008-03-17
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.
0
Comment
Question by:laporta
  • 4
  • 3
7 Comments
 
LVL 41

Expert Comment

by:shanesuebsahakarn
ID: 12125593
It should work - can you manually change it back? Also make sure that NameAutocorrect is turned off (Tools->Options->General).
0
 

Author Comment

by:laporta
ID: 12126339
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.
0
 

Author Comment

by:laporta
ID: 12127523
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?
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 41

Expert Comment

by:shanesuebsahakarn
ID: 12128095
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.
0
 

Author Comment

by:laporta
ID: 12132543
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.
0
 
LVL 41

Accepted Solution

by:
shanesuebsahakarn earned 250 total points
ID: 12133361
Hmm, I'm not sure why - the _ is the ADO equivalent of ?.

You could try:
Aline "_____" And Len([MyField])=5

I'm not sure if this will work though.
0
 

Author Comment

by:laporta
ID: 12144351
No..it didn't work...I ended using A different workaround...thanks anyway
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MS Access 2016 Debugging 7 42
VBA to alter Table in MS Access .mbd (2000-2003) database 5 27
Direct Mail software 4 42
Set focus on next field when character count = 5 9 12
It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now