Combo box to find records

  • Thread starter Thread starter Michaelchessking
  • Start date Start date
M

Michaelchessking

Hi, need help with what I am sure is a simple problem.

I have a form and wish to find records using a combo box. Which I know how
to do. The problem is it takes me to "one" record. I would like to select,
for example, employee name: John Smith and it return all records for John
Smith while filtering out all other records.

I would be thankful for any help.

Thanks,
Michael
 
Hi, need help with what I am sure is a simple problem.

I have a form and wish to find records using a combo box. Which I know how
to do. The problem is it takes me to "one" record. I would like to select,
for example, employee name: John Smith and it return all records for John
Smith while filtering out all other records.

I would be thankful for any help.

Thanks,
Michael

Try setting the Form's Filter property. Since you don't name the combo box, or
give us any indication of your tablenames or fieldnames it's a bit hard to be
specific, but try something like this in the combo box's AfterUpdate event:

Private Sub cboMyCombo_AfterUpdate()
Me.Filter = "[EmployeeID] = " & Me!cboMyCombo
Me.FilterOn = True
End Sub


John W. Vinson [MVP]
 
Back
Top