Comparing text fields to find upper case lower case mismatches

  • Thread starter Thread starter RAN
  • Start date Start date
R

RAN

I have to compare a text field in one table to a corresponding text field in
a master table. I need to identify where the case of each letter doesn't
match the case of each letter in the master table. I've tried using the
StrComp function in a query but I'm not getting the expected results. Can
anyone help? For example,
StrComp(Stainless Steel, stainless steel) gives a value of 1, but
StrComp(Stainless Steel, Stainless Steel) also gives a value of 1.
Thanks in advance for your help.
 
The query is still getting all records where there is a match. Should this
not be done in a query? "Where" & "StrComp()" in the field definition or in
the criteria gives a invalid syntax error, so I dropped the "Where" in the
Field Definition and put the <>0 in the Criteria.
StrComp(Stainless Steel, Stainless Steel, 0) = 1

Beetle said:
Untested, but try using a criteria like;

Where StrComp([Field1], [Field2], 0)<>0

--
_________

Sean Bailey


RAN said:
I have to compare a text field in one table to a corresponding text field in
a master table. I need to identify where the case of each letter doesn't
match the case of each letter in the master table. I've tried using the
StrComp function in a query but I'm not getting the expected results. Can
anyone help? For example,
StrComp(Stainless Steel, stainless steel) gives a value of 1, but
StrComp(Stainless Steel, Stainless Steel) also gives a value of 1.
Thanks in advance for your help.
 
Thanks for your help. One of the fields has blank spaces after the text, so I
used the Trim() function to remove all blanks around the text and StrComp()
works like a charm. Thanks again.

Beetle said:
Untested, but try using a criteria like;

Where StrComp([Field1], [Field2], 0)<>0

--
_________

Sean Bailey


RAN said:
I have to compare a text field in one table to a corresponding text field in
a master table. I need to identify where the case of each letter doesn't
match the case of each letter in the master table. I've tried using the
StrComp function in a query but I'm not getting the expected results. Can
anyone help? For example,
StrComp(Stainless Steel, stainless steel) gives a value of 1, but
StrComp(Stainless Steel, Stainless Steel) also gives a value of 1.
Thanks in advance for your help.
 
Back
Top