Combo Boxes

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

Guest

I would like to creat a combo box that has two columns. One column has the
value NSN from the table NSN and the other column has the value Price from
the NSN table. I would like for bpth values to appear in the table once
selected. I can't seem to get the right code for this to happen. I can
create so that the drop down menu shows both columns but then only the NSN
value appears in the table. If it is of any help I am using Microsoft Access
2003
 
Your combo box is bound to the NSN field in the table. The other column isn't
bound to anything. Create a field on the form that is bound to the Price
column in the table. You don't have to display it if you don't want to. In
the AfterUpdate event on the combo box add the code:

Me.YourPriceFieldName = Me.YourComboBoxName.Column(1)

Note....the first column in the combo box is 0 in Access. The second column
is 1.
 
-----Original Message-----
Your combo box is bound to the NSN field in the table. The other column isn't
bound to anything. Create a field on the form that is bound to the Price
column in the table. You don't have to display it if you don't want to. In
the AfterUpdate event on the combo box add the code:

Me.YourPriceFieldName = Me.YourComboBoxName.Column(1)

Note....the first column in the combo box is 0 in Access. The second column
is 1.


.
 
Back
Top