>HI,
>I am using a syntax taht goes like this :
>SELECT Company, Address FROM Companies WHERE ALLTRIM(Address) = ALLTRIM(ThisForm.TxtAddress.Value) INTO CURSOR MyCursor
>
>My problem is that the rows selected are the ones that contain the trimmed value of Txtaddress.Value AND the the companies that has a empty address field ("").
>
>Am I missing something or what ?
>
The empty string matches everything with the compare mode you have set. Either switch to the
== comparator, or change how the
= works via the SET ANSI (set to ON, pads the shorter string with spaces to make it the same length as the longer string before comparing) and SET EXACT. If you want to have matches on partial strings, SET ANSI OFF and SET EXACT ON, and use the
= comparator.
There's a table in the on-line help documentation for SET EXACT that would be helpful when trying to get the compare to work the way you'd like.
>Thank you for your help,
>Christian Cote