Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box Names filtering

Status
Not open for further replies.

osimini1

MIS
Jun 9, 2008
29
US
I have Combo box in a form as a search criteria to pull customer information from the tblCustomers and populate the form. The combo box populates the customer names and works as required. But my problems now is how to filter the combo box to populate only the customer assign to a particular employee. For example, I have a table called tblUsers with userID, UserName and UserType.

Here is the code I used to populate the combo box with the customer names.
Private Sub cboSelect_AfterUpdate()
' Find the record that matches the control.
Me.RecordSource = "SELECT * FROM tblCustomer WHERE CustomerID = " & Me.cboSelect
End Sub

Based on the information above is there any way to twick the code to accomplish to do this. Please note that the main form is bound to tblCustomers
 
How are ya osimini1 . . .

Do you have an [blue]Employees[/blue] table related to the [blue]Customers[/blue] tabe? ... you need to get the [blue]EmployeeID[/blue] in the rowsource of the combo to ping on!

[blue]Your Thoughts? . . .[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top