Multiple column combo-box

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

I have a combo box in my "Inventory Transaction" form
which displays two columns ("Item Code" and "Description")
from the "inventory item" table. I want to be able to
select an item from the combo-box and populate both
fields in the related table "Inventory Transactions".
When I set up the combo-box using the wizard, Access only
allows for storing information in one field.

Any ideas?
 
You can reference each column in VBA
Me.comboboxname.Column(n) where n is the column number
you want.
 
Well here's what I tried. I placed the following syntax
in the Control Source of the Textbox where I want to
display my Item Description (column 2 of the combo box
named "cboItemCode"):
=[cboItemCode].[Column (2)]
however it returns #NAME?
What isn't working?
 
Column numbering starts with 0. So the second column is index 1.

hth,
Andy

Jim said:
Well here's what I tried. I placed the following syntax
in the Control Source of the Textbox where I want to
display my Item Description (column 2 of the combo box
named "cboItemCode"):
=[cboItemCode].[Column (2)]
however it returns #NAME?
What isn't working?
-----Original Message-----
You can reference each column in VBA
Me.comboboxname.Column(n) where n is the column number
you want.


.
 
Back
Top