"auto-complete"

  • Thread starter Thread starter Bill Stanton
  • Start date Start date
B

Bill Stanton

My so-called "creative imagination" is failing
me today... What technique would work to
essentially duplicate the auto-select feature
inherent with a combo. I.e., with a combo
box displayed, whose underlying RowSource
is some query or table, the operator/user begins
to enter characters that correspond to the
initial characters in the displayed field within the
query/table and the response is to position to
that record... poorly worded, but you get what
I mean. Anyway, I want to create a feature with
the use of a text-box where the user begins to
enter data and gets an automatic response of
the initial best match in a list of "canned" titles.
If you've ever used Quicken, it would correspond
to their "auto-complete" feature.

I can envision a table of canned titles where the
comparisons are made upon each OnChange
event within the text-box, but it seems to me that
there might be a less messy way to accomplish
that within Access facilities that I'm not yet aware
of.

Your thoughts please.

Thanks,
Bill
 
-----Original Message-----
My so-called "creative imagination" is failing
me today... What technique would work to
essentially duplicate the auto-select feature
inherent with a combo. I.e., with a combo
box displayed, whose underlying RowSource
is some query or table, the operator/user begins
to enter characters that correspond to the
initial characters in the displayed field within the
query/table and the response is to position to
that record... poorly worded, but you get what
I mean. Anyway, I want to create a feature with
the use of a text-box where the user begins to
enter data and gets an automatic response of
the initial best match in a list of "canned" titles.
If you've ever used Quicken, it would correspond
to their "auto-complete" feature.

I can envision a table of canned titles where the
comparisons are made upon each OnChange
event within the text-box, but it seems to me that
there might be a less messy way to accomplish
that within Access facilities that I'm not yet aware
of.

Your thoughts please.

Thanks,
Bill
Hi Bill,

use the OnChange() event to requery the listbox
of "canned" titles. In the listbox rowsource have a
reference to the textbox.text property. Use the following
as an example.

textbox name: txtCriteria
listbox name: lstTitle
form name: frmTitleSearch

private sub txtCriteria_OnChange()
lstTitle.requery
end sub

lstTitle.rowsource="Select TitleID, Title From tblTitle
Where ((Title) like forms!frmTitle!txtCriteria & *) Order
By Title"

Luck
Jonathan
 
Thanks Jonathan, it looks like a plan.
Bill


Jonathan Parminter said:
Hi Bill,

use the OnChange() event to requery the listbox
of "canned" titles. In the listbox rowsource have a
reference to the textbox.text property. Use the following
as an example.

textbox name: txtCriteria
listbox name: lstTitle
form name: frmTitleSearch

private sub txtCriteria_OnChange()
lstTitle.requery
end sub

lstTitle.rowsource="Select TitleID, Title From tblTitle
Where ((Title) like forms!frmTitle!txtCriteria & *) Order
By Title"

Luck
Jonathan
 
Hi Bill,

I've been attempting to manufacture some kind of
autocomplete system for a while, combo box is the only
way to go at the moment.

Mark Snowdon
 
Back
Top