adding search / filter to a form

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

In a form, how can I add the functionality of typing "S" would take
you to the first listing beginning with s. Then typing M would take
you the first
occurance of SM, and so on. If you typed SMITH it would take you top
the first smith.

I don't want to use a combo box.

This is in a form where the user only has rights to view.


Thanks, Mike
 
Make sure the text box where the user types is unbound.
Use the Change event to FindFirst in the RecordsetClone of the form.
 
Is there a way to do it so you don't have to have the focus anywhere?
so when the form is loaded it responds to key presses as search input,
with ESC as clear the filter?
 
No. You need to be entering the text into some control.

You can trap the Esc character in the form's KeyDown event if its KeyPreview
is on, or you could place a command button on the form and set its Cancel
property to True.
 
Back
Top