UCase validation works in one database but not in other

H

Hugh self taught

Hi All,

I must be missing a setting somewhere. In 2 very similar databases on the
same machine I have a text box where I've set the Validation Rule to
=UCase([Nat_Reg]). In the one database it converts the input to uppercase in
the related table but it doesn't in my other database.

I have subsequently changed my approach to using KeyAscii =
Asc(UCase(Chr(KeyAscii))) on key press, but was wondering why the first
method worked in one database & not the other
 
J

John Spencer

The validation rule does not change data. It only checks if the data
input into the control meets a rule. Also, as a validation rule this
will not check whether something is uppercase or not. In Access data is
not case-sensitive.

Perhaps you meant something else.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
F

fredg

Hi All,

I must be missing a setting somewhere. In 2 very similar databases on the
same machine I have a text box where I've set the Validation Rule to
=UCase([Nat_Reg]). In the one database it converts the input to uppercase in
the related table but it doesn't in my other database.

I have subsequently changed my approach to using KeyAscii =
Asc(UCase(Chr(KeyAscii))) on key press, but was wondering why the first
method worked in one database & not the other

The Validation Rule property is not case sensitive and only checks if
the value meets the Validation Rule, it doesn't change the value to
meet it.

Most likely you have code in the AfterUpdate event in one of the
databases that changes the value and not in the other.

Something like:
Me.[ControlName] = UCase([ControlName])
 

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