Spangltk


In my form the user is typing the name of a product in a text box. Then they will add attributes to that product. I want to have a label underneath the text box that will dynamically change with what they are typing. Searching for existing products and displaying the closest match. That way if they want to edit an already existing project they can find the name.

this is my code, its placed in the txt_SurveyName.InteractiveChange event.

SEEK thisform.txt_SurveyName.Value ORDER 'SurvDesc' IN 'SurveyInfo'
thisform.lbl_SurvFind.Caption = SurveyInfo.SurvDesc

When the program hits the SEEK line it gives me an error: Expression Evaluator Failed. If I ignore it, it still works. can anyone help



Re: Troubles with a form --Expression Evaluator Failed--

dni


You may try to use SET ORDER prior SEEK:

SET ORDER TO <INDEX NUMBER.....etc>

SEEK thisform.txt_SurveyName.Value







Re: Troubles with a form --Expression Evaluator Failed--

AndyKr

You should use the SEEK() function in preference to the command because that not only allows you to specify an index tag that is not open, but returns .T. or .F. as the result of the Seek. If .T. then the record pointer is on the correct record, if .F. it is at EOF()

IF SEEK( thisform.txt_SurveyName.Value, 'SurveyInfo', 'SurvDesc' )
*** Found code here
ELSE
*** Not Found Code here
ENDIF