Hello:
I know how to populate 2 combo boxes that are unbound, but would like to know how to populate a combo box based on a text box that is bound.
My code is:
txt18 is a number(and primary key) as well as fldDISTRIBUTOR is a number as well. These 2 fields are identical. fldOEM in the table is a text field. The goal to achieve is when the record is viewed, a combo box lists all of the OEMs related to the record.
Any suggestions? I am doing this in an After Update function.
I appreciate any help.
Thanks,
Bradley
I know how to populate 2 combo boxes that are unbound, but would like to know how to populate a combo box based on a text box that is bound.
My code is:
Code:
Me.cboOEM.RowSource = "SELECT fldOEM FROM" & _
" tblOEM WHERE fldDISTRIBUTOR = " & _
Me.txt18.Value & _
" ORDER BY fldOEM"
Me.cboOEM = Me.cboOEM.ItemData(0)
txt18 is a number(and primary key) as well as fldDISTRIBUTOR is a number as well. These 2 fields are identical. fldOEM in the table is a text field. The goal to achieve is when the record is viewed, a combo box lists all of the OEMs related to the record.
Any suggestions? I am doing this in an After Update function.
I appreciate any help.
Thanks,
Bradley