Hi,
1) Can someone explain how to implement find as you type in a form search criteria.
For example, I have the customer search field and i want to search for all customers containing the word 'george'
i used setfilter(fieldname,searchvalue) and it only returns exact match. i want the program to return results of %george%
2) How can i display unique values of a column in a drop down list from a table?
Thanks,
Vasilis
0
Comments
2) a drop down list is populated at design time, so you can't use the values of fields in a drop down list (= option field)
2) for example post code has another column names city name. Do i have to create another table to store city names to be able to display them in an option field?
Thanks,
Vasilis
If you want to show unique values for a field in a lookup form, you have to program it yourself. When someone hits F6 in the field, you read the table and put all unique values in a temptable. This table you can then show in your form to have the user select a value.
This is +- the code (example on City of table Post Code):
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Alos, in which part of the form i add this code?
Thanks,
Vasilis
-Where to put the code: Again in my example: you would put that code in the OnLookup-trigger of each City-field where you want that functionality. Best put it in the table, not in the form.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
I create a new table named tmpCity with a column city text 50.
Then on the lookup of the form I added the code mentioned above.
Now on the new form i added a text field with sourceExpr CityFilter(text 50)
on the table relation i used tmpCity. When i compile and run the form i cannot select from the list.
Can you assume what i am doing wrong?
Thanks,
Vasilis
-field CityFilter: you need to put the code in the OnLookup-trigger of the field.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!