Ken,
I appreciate your quick response. I have created some code that should be
able to do what I want. The problem I am having is that it is always one step
behind. For example, I start to type "mi" in the search box (text61), the
list box (list0) then shows all of the words starting with the letter "m". I
then continue typing and add a "c" so the search box now reads "mic", the
list box then shows all the results that start with "mi". As you can see it
is always one step back. I have attached the code I have created. Do you have
any answers?
Private Sub Text61_change()
Dim x
Debug.Print x
x = Me.Text61.Value
'Me.List0.Requery
Me.List0.RowSource = "SELECT [Job Listings Table].Company, [Job Listings
Table].[Ref #], [Job Listings Table].[Job Title], [Job Listings Table].[Job
Type], [Job Listings Table].Company FROM [Job Listings Table] WHERE ((([Job
Listings Table].Company) Like '" & x & "*')) ORDER BY [Job Listings
Table].Company, [Job Listings Table].[Job Type], [Job Listings Table].[Job
Title];"
Me.List0.Requery
Me.Repaint
Me.List0.SetFocus
Me.Text61.SetFocus
Me.Text61.SelStart = Me.Text61.SelLength
End Sub
Ken Snell said:
Not directly. You'd need to put a textbox on the form and use the textbox's
Change event to mimic this. Code would run on that event that would do a
search of the listbox's second column's values to find the first one whose
starting characters match what is in the textbox, and then move the listbox
to that row.
--
Ken Snell
<MS ACCESS MVP>
yourself.