Combo Boxes

E

Effie

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
 
R

rowiga

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.
 
L

LHL

-----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.


.
 

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

Similar Threads

best way to populate multiple Unbound text boxes? 2
Combo Boxes 1
Combo Boxes 0
Combo Boxes 1
combo boxes 9
Combo boxes 3
Combo box 0
Duplicating values to empty field 6

Top