Jayesh,
Thanks for the help, but for some reason I tried what you had suggested and I still got an unexpected lookup result. If I enter "LE" in my textbox that's tied to ALLT(m.stext) then the result listbox always starts with names beginning with "LA" not "LE". I thought your code would work great. I wonder why it doesn't work. It works just like my commented out code below. Any ideas? Thanks again.
I tried SET EXACT ON and that did nothing new.
Here's my latest code for doing a lookup of a record.
SELECT agency
SET FILTER TO
IF THISFORM.Stype.Value = 1
SET ORDER TO agcy_name
lnSearchLen=LEN(ALLT(m.stext))
SET FILTER TO LEFT(agency.agcy_name,lnSearchLen)=>ALLT(m.stext)
ENDIF
IF THISFORM.Stype.Value = 2
SET ORDER TO agency
lnSearchLen=LEN(ALLT(m.stext))
SET FILTER TO LEFT(agency.agency,lnSearchLen)=>ALLT(m.stext)
ENDIF
Steve Kramer
Kramer & Kramer Design
"Home of Go Cartoons"
Web Site:
www.stephenkramer.comWould you believe Far Side Lite?
More than 270 original cartoons.