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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looking in a List for a Element

Status
Not open for further replies.

ShyFoxBack

Programmer
Joined
Feb 24, 2004
Messages
18
Location
RO
I have a text1, a text2 and a list with two columns: Code and Elements - from a table. I want when I insert an element by hand into text1, after I push Enter, text2 to be filled with element's code from the list.
I think that's called incremental search but I didn't worked with that by now.
Regards
 
If you want in like e-mail, use the interactivechange event on the textbox you are entering into. Here is some sample code from a basic search box, searching employee name and returning ssn.

Code:
* Seek value, tablename, index name
IF SEEK(ALLTRIM(THIS.VALUE),[employee],[emp_name])
	THISFORM.returnValue = employee.ssn
ELSE	
	THISFORM.returnValue = []
ENDIF

IF !EMPTY(THISFORM.returnValue)
	THISFORM.RefreshEditBox
ELSE
	THISFORM.edtResults.VALUE = []
ENDIF

Note: You may need to refresh your editbox or listbox in the case of a found condition.

Jim Osieczonek
Delta Business Group, LLC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top