Validation Rules

G

Guest

I have a validation rule set up on a field as follows: In("Y","N"). When
data is entered manually into the table, the validation rule accepts both
upper and lower case characters.

When I try to import data to the same table, and there are lower case
characters in this field, the import rejects and produces the standard
(useless) Access error message. I have proven this by finding some of the
rejected records, changing the value to upper case, then re-importing with no
problems.

As I see it, the validaton during manual entry needs to accept only upper
case characters. Does anyone have any suggestion on how to do this?

Thanks.
 
J

John Nurick

If you set the table's validation rule (not the field's) to something
like this

InStr(1,"YN",[FieldName],0)>0

it will only accept uppercase. In addition, set an input mask on the
field of
so if the user types 'y' or 'n' it is automatically folded to upper
case.
 
G

Guest

Thanks for the suggestion. I already have the input mask as >, but something
must be wrong. I will try your other idea to see what happens.

Thanks.


John Nurick said:
If you set the table's validation rule (not the field's) to something
like this

InStr(1,"YN",[FieldName],0)>0

it will only accept uppercase. In addition, set an input mask on the
field of
so if the user types 'y' or 'n' it is automatically folded to upper
case.

I have a validation rule set up on a field as follows: In("Y","N"). When
data is entered manually into the table, the validation rule accepts both
upper and lower case characters.

When I try to import data to the same table, and there are lower case
characters in this field, the import rejects and produces the standard
(useless) Access error message. I have proven this by finding some of the
rejected records, changing the value to upper case, then re-importing with no
problems.

As I see it, the validaton during manual entry needs to accept only upper
case characters. Does anyone have any suggestion on how to do this?

Thanks.
 

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