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

Auto Searching Matching Text

Status
Not open for further replies.

devdba

Programmer
Dec 11, 2002
15
GB
I have a text field in my form that isnerts data into my table.
I want that the text item should be able to auto search the matching text in the database when i write in it so it speeds up data entry.

like in excel and some other text editors when you type 'al' it gives you the options of 'ali','albert' etc.

how is this possible in form?
 
hi
make a timer
and in the when_timer_expiered tigger write

excute_query;

and in the block property

in the where propery write

:block.itemname||"%"

and sorry for my poor english
 
An execute query every time a timer fired would be very expensive on network.

My favoured approach is to retrieve all possible values into a record group, then query the group each time the timer fires AND the value in the text item has changed.
 
Lewisp, I don't think that fetching all records to recordgroup is more efficient. When you requery block changing criterium at each keystroke, it's not necessary to fetch the whole result set each time. Moreover, by default only displayed records are fetched. So, I suppose that the truth is somewhere between your and ocp76's answers: timer trigger should check whether the value was changed (compare with some "global" variable) and then requery block. Of course, it's more than advisable to have the table being queried sufficiently small or at least indexed by that field.

Regards, Dima
 
hi

just make the timer work(execute query) only when the value of text item changed.

as sem said
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top