What are you ultimately trying to find in your search? If you want to look for occurances of "MA " but not "MA" in the person.first field, you shouldn't be trimming the m.lo1 value or the field.
BROWSE FOR UPPER(m.lo1) $ UPPER(person.first)
i.e. You only want to see GRANDMA and UMA, but not MARY
If you want to find all occurances of "MA", regardless of where the letters appear in the name, then you would trim m.lo1.
BROWSE FOR ALLTRIM(UPPER(m.lo1)) $ UPPER(person.first)
i.e. You want to see GRANDMA, UMA and MARY
Note that I'm only trying to help with the use of
$ and trimming. As others have said, depending on how it's being applied will determine if it's really the best approach.
HTH
- Brian
>I did that, but my question remains WHY having to need to do that for the FIELD?
>
>m.lo1 = "ma " so ALLTRIM(UPPER(m.lo1)) makes it "MA"
>
>and
>
>should find
>"Grandma Smith"
>"Grandma Smith "
>" Grandma Smith"
>"Grandma Smith"
>
>Right?
>
>Chuck
>
>>BROWSE FOR ALLTRIM(UPPER(person.first)) = ALLTRIM(UPPER(m.lo1))
>>
>>and
>>
>>BROWSE FOR ALLTRIM(UPPER(m.lo1)) $ ALLTRIM(UPPER(person.first))
>>
>>I find I get more consistent results by making each side of the equasion as equal as I can before I do the comparison.
VFP6 SP5, VFP8 SP1, VFP 9 SP 1 and Win XP SP 3 (unless otherwise specified)
www.wulfsden.com