Validation Rules

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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.
 
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.
 
Back
Top