Create a query collecting the ID of the company and the company name, sorted
in ascending order. Use that query to fill a two column combo box with the
first (ID) columns set to 0 width...all you'll see are the company names in
the combo box.
Place the combo box in the form header.
Place a text box with its data source set to the company ID field in the
form's detail section. You can set its visibility property to No. Place all
the other fields you want on the form.
Place this code in the AfterUpdate event of the combo box::
'remove the parenthesis below
Private Sub "Your ComboBox Name"_AfterUpdate()
'Find the record that matches the control.
Me.RecordsetClone.FindFirst "[Your ID Field Name] = " & Me![Your
ComboBox Name]
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
The user can select the company from the ComboBox or type the name and
Access will display the company name most closely associated with what's
entered.
The AfterUpdate event will display the associated data in the form's detail
section.
BaDonkaDonk said:
I am currently in Access and I want to be able to when I type the name of
a company that I am looking up information for that all of the information
will show up. I know you can do it, but I can't seem to figure it out.