By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,934 Members | 1,476 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,934 IT Pros & Developers. It's quick & easy.

How do I find the text which is entered in UPPER CASE

P: 1
Using Access, I need to identify which records in my database are entered in UPPER CASE.

I don't want to convert to lower case. I simply need to know which records need have this problem.

Thanks

CathyL
Mar 10 '10 #1
Share this Question
Share on Google+
2 Replies


TheSmileyCoder
Expert Mod 100+
P: 2,321
I don't know if there is a native SQL way of doing this, but try adding this as a field to your normal select Query

Expand|Select|Wrap|Line Numbers
  1. expr1: StrComp([tx_Main];UCase([tx_Main]);0)=0
And then add as a criteria that this field must be true.

Simply replace tx_Main with the name of the field you want to check for Uppercase.

If your having trouble making it work, try to poste your normal SQL select query here, and I can help you adept it.

Explanation:
StrComp will compare the first and second argument, and return 0 if they are equal to each other. (which is why I added the =0 to the end)
The 3rd argument passed to strCompare is a 0, telling strCompare to use binary comparison (in which "a" not equal "A"), as composed to Textual comparsion (in which "a"="A").

The Ucase converts the field to upper case. So the logic is that if the Uppercase converted field is equal to the non-converted field, the field must have been uppercase to begin with.
Mar 10 '10 #2

TheSmileyCoder
Expert Mod 100+
P: 2,321
Curious, did this work for you?
Apr 7 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.