Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I get Found() to return .T. on a SEEK

Status
Not open for further replies.

mHeit

Programmer
Dec 6, 2004
14
US
Trying to do an incremental search.

Created cursor adapter that contains a cursor with insurance adjuster full names in 'adjuster' field (John Doe, Jane Doe, etc).
My select command is:"select distinct ins_info.adjuster from ins_info".
Also after cursor is created I create an index: INDEX ON UPPER(adjuster) TAG adjuster

In the Interactivechange event of the textbox I use, I put:

SELECT(this.LookupAliasName)
set near on
SEEK alltrim(this.TypedInValue)
if FOUND()
*do some processing
endif
set near off

*****
How come no matter what I type Found() returns false? Everytimes I type a letter the pointer moves to the closest matching record. But Found() never returns True.
What gives?

Thanks
 
Sorry, figured it out.

Needed to set Exact off. Then it works fine. Duh!
 
You don't need ALLTRIM if near is set to ON.
Also, no needs for FOUND() either.

Code:
IF SEEK (this.TypedInValue)
 *do some processing
ENDIF

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top