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
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