comparing upper case with lower case

  • Thread starter Thread starter Leslie Isaacs
  • Start date Start date
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
 
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
 
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]
 
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]
 
Back
Top