Combo Box Prolem

  • Thread starter mattc66 via AccessMonster.com
  • Start date
M

mattc66 via AccessMonster.com

Hi All,

I have a combo box that will not let me select the items using my mouse. I
can use the Arrow Down Key and then hit TAB to select the item. The only
thing that I think may be causing this is the ROW source. I have this change
depending on the company location.

See Code that fires when the user select the Customer ID. The 3rd line from
the bottom sets the ROW source for the item. The combo box is bound to a
feild called ITEM. Maybe this should be unbound. Can anyone help?

Thanks

Private Sub CustID_AfterUpdate()

Dim stFilter As String
Dim stEmp As String
Dim stCoNum As String

'Sets the default Ship from Warehouse
If Me.Company = "C1" Then
Me.Whse = "1B"
End If

If Me.Company = "C2" Then
Me.Whse = "2C"
End If

stCoNum = Me.Company

If stCoNum = "C1" Then
stFilter = "qryLookUpItem_C1"
stEmp = "qryLookupSalesEmp_C1"
ElseIf stCoNum = "C2" Then
stFilter = "qryLookUpItem_C2"
stEmp = "qryLookupSalesEmp_C2"
End If

Forms![frmQuotes]![sfrmOrdersSubform].Form.Item.RowSource = stFilter
Me.Salesperson.RowSource = stEmp

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top