Use combo-box selection as criteria for a text box on form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to pass the value selected in a bound combobox (cboItem) to a query
(or a SQL statement) that can then determine the adjacent text box value for
# of units in that item. my query is qryItemList.

This way the user doesn't have to go look up the # of units for that item.
 
Figured out that I should make a dlookup for the text boxes on the combo
boxes after update event.

Private Sub cboKCIItem__AfterUpdate()
Me.txtExpandedQty = DLookup("[Qty1]", "[qryKCIItem#UniqueList]", "[Order
file_KCIItem#]=" & "'" & [Forms]![frmAddMissingChargeRequest]![txtKCIItem#] &
"'")
Me.txtShippedQty = 1
End Sub
 
Back
Top