Sign in to follow this  
pi_equals_3

[web] Access Alphanumeric validation rule

Recommended Posts

pi_equals_3    517
I guess I'm in a questioning mood today! :) I need to find out how to create a validation rule within Access 2000 to make sure a password field contains only letters and numbers. I'm trying to loop through each character and check to see if it's within the string "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" but I can't seem to find a way to check EACH character. If someone knows how to do this, or knows of a better way to accomplish what I', trying for, I'd appreciate your input. Thanks!

Share this post


Link to post
Share on other sites
evolutional    1393
Try: InStr("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", [FieldName]) > 0

That will check to see if the characters you requested are in FieldName.

Bear in mind, you can also write your OWN routines in VB, meaning you can also check for length too.

So: (InStr("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", [FieldName]) > 0) And (Len([FieldName]) => 8)

Will make sure the password is 8 characters long and contains only valid characters.

Hope this helped

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this