comparing upper case with lower case

L

Leslie Isaacs

Hello All

I need a query that will return the records where a particulat text field
Code:
 is not all in upper case. I tried setting the criteria for [code] as
<>UCase([code]), but it seems that access doesn't recognise the 'case' of a
value when it come to comparing it with other values. Is there any other way
to do this?

Thanks for any help.
Leslie Isaacs
 
J

John Spencer

You should be able to use StrComp (String Compare) or Instr (In String) to
do this.

WHERE Instr(1,
Code:
,UCase([Code]),0) = 0

Where StrComp([Code],UCase([Code]),0) <> 0
 
L

Leslie Isaacs

Many thanks - both these worked a treat!
Les


John Spencer said:
You should be able to use StrComp (String Compare) or Instr (In String) to
do this.

WHERE Instr(1,
Code:
,UCase([Code]),0) = 0

Where StrComp([Code],UCase([Code]),0) <> 0


[QUOTE="Leslie Isaacs"]
Hello All

I need a query that will return the records where  a particulat text
field [code] is not all in upper case. I tried setting the criteria for
[code] as <>UCase([code]), but it seems that access doesn't recognise the
'case' of a value when it come to comparing it with other values. Is
there any other way to do this?

Thanks for any help.
Leslie Isaacs
[/QUOTE]
[/QUOTE]
 
L

Leslie Isaacs

Many thanks
Both methods given at the reference worked a treat ... and I'm learning!
Les


Jerry Whittle said:
Hi,

Check this out from MS:
ACC2000: How to Return Case-Sensitive Matches in Queries
http://support.microsoft.com/?kbid=209674
--
Jerry Whittle
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


Leslie Isaacs said:
Hello All

I need a query that will return the records where a particulat text
field
Code:
 is not all in upper case. I tried setting the criteria for [code]
as
<>UCase([code]), but it seems that access doesn't recognise the 'case' of
a
value when it come to comparing it with other values. Is there any other
way
to do this?

Thanks for any help.
Leslie Isaacs
[/QUOTE][/QUOTE]
 

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