Hi. In the below picture, my field that says Vendor is cboVENDOR. Using cascading combo boxes, when the user selects the Vendor, the next cboPN shows the part number. I am looking to find a way to show the 2nd column of cboPART in the text field(Text 17) after it, which is called txtDES.
Here is the code for cboVENDOR after update:
Then in txtDES(Text 17), I thought I would use the code in the control source:
Is there a better way to get this to work?
I appreciate any help.
Here is the code for cboVENDOR after update:
Code:
Private Sub cboVENDOR_AfterUpdate()
Me.cboPN.RowSource = "SELECT fldPN, fldDESCRIPTION FROM" & _
" tblPARTS WHERE fldVENDORID = " & _
Me.cboVENDOR & _
" ORDER BY fldPN"
Me.cboPN = Me.cboPN.ItemData(1)
End Sub
Then in txtDES(Text 17), I thought I would use the code in the control source:
Code:
=[Me].[cboPN].[1]
Is there a better way to get this to work?
I appreciate any help.