is there a solution to this?

O

Omar

I'm currently using Access, and I was wondering if it was
possible to have a validation that allows the letters A-Z
AND the numbers 0-9... BUT NOTHING ELSE

Is this possible? If yes, what is the validation?

Thanks in advance
 
P

PC Datasheet

For A-Z use the Asc function and check if between 65 and 90
For a-z use the Asc function and check if between 97 and 122
For 0-9 use the Asc function and check if between 48 and 57
 
O

Omar

i dont really understand what you mean...

what i wanted was one full validation rule that I could
input into a database in Access, that allows me to enter
the letters a-z and the numbers 0-9, but nothing else at
all (all these: !"£$%^&*()=+_-<>\{}@#~;?)
 
K

Kevin

-----Original Message-----
I'm currently using Access, and I was wondering if it was
possible to have a validation that allows the letters A-Z
AND the numbers 0-9... BUT NOTHING ELSE

Is this possible? If yes, what is the validation?

Thanks in advance

What you may want is an input mask. 'A' allows the entry
of a letter or digit, entry required, while 'a' makes the
entry optional. Search Help under Input Mask.

HTH
Kevin Sprinkel
Becker & Frondorf
 
P

PC Datasheet

Omar,

Check the Help file for the ASC function to understand what ASCII values are
then write code to check the ASCII value of what was entered.

Steve
PC Datasheet

i dont really understand what you mean...

what i wanted was one full validation rule that I could
input into a database in Access, that allows me to enter
the letters a-z and the numbers 0-9, but nothing else at
all (all these: !"£$%^&*()=+_-<>\{}@#~;?)
 
J

John Nurick

Hi Omar,

Try the validation rule
Not Like "*[!0-9A-Z]*"
coupled with an input maskto wrap all characters to upper case.
 
O

Omar

Thanks a lot John, you got it!!

Not Like "*[!0-9A-Z]*" needed just a space between 0-9 and
A-Z, no input mask was required. Thankyou very much

-----Original Message-----
Hi Omar,

Try the validation rule

coupled with an input mask
>
to wrap all characters to upper case.


I'm currently using Access, and I was wondering if it was
possible to have a validation that allows the letters A- Z
AND the numbers 0-9... BUT NOTHING ELSE

Is this possible? If yes, what is the validation?

Thanks in advance

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top