ComboBox Columns

  • Thread starter Thread starter Shiner452
  • Start date Start date
S

Shiner452

I have a combo box that displays 3 fields...when a selection is made on
of the field is stored in a different table. I would like to be abl
to store 2 of the fields in the combo box into the same table.

That is one of my options...my other option is...

to have two seperate combo boxes. When one selection is made on on
box the other combo box will show the corresponding field value.
have been able to set up a form to work this way with the code:

Private Sub cboItem_Change()
Let cboStockNumber.value = cboItem
End Sub

This works and shows the fields corresponding values but only when th
combo boxes are unbound. When the combo boxes have a control sourc
this same code causes each combo box to show the same exact value, no
the corresponding field value. Any help at all would be great.
Thanks
 
I have a combo box that displays 3 fields...when a selection is made one
of the field is stored in a different table. I would like to be able
to store 2 of the fields in the combo box into the same table.

Ummmm... WHY?

Storing data redundantly is VERY bad design. Could you explain what
you're trying to accomplish? Ordinarily you would store only the
linking field in the second table.

If you just want to *see* the values in the other two fields on your
Form, put Textboxes with control sources

=comboboxname.Column(x)

where (x) is the *zero based* subscript of the field in the combo's
row source.
 
I have a greenhouse company that grows a wide variety of plants and I a
designing a database with a very user-friendly interface so my compute
illiterate growers can input data. I have one table that include
stock number and item name where stock number is the primary key. Thi
table is there to collect cost information on each item that we grow.
My second table is for production purposes and it has the stock numbe
and pot size and other such information. I then have a query tha
relates the two tables and shows the item of what is being produce
based on its stock number. However, I want my growers to be able t
enter information into the production table such as how many pots wer
potted for a specific crop. They dont know the stock numbers but the
know the item names of the crops. The problem is that they cannot loo
up the data in the production table because there is no item name. I
there anything I can do here? Do I have my tables set up wrong? Wha
I was trying to do with the combo box was put both Item and Stoc
number as colums and have both columns go to the Production table s
the growers could pull up a crop by item and make changes to productio
information. I have moved away from that now but am still stuck on th
problem. Sorry for the long post but any help will be greatl
appreciated
 
They dont know the stock numbers but they
know the item names of the crops. The problem is that they cannot look
up the data in the production table because there is no item name. Is
there anything I can do here? Do I have my tables set up wrong?

You can use a Form (in fact, if you're using table datasheets... STOP;
they're NOT designed for production use, just for debugging) with a
Combo Box. The Combo Box can *show* the item name but *store* the
StockNumber in your table.

Could you explain the context? Are you using a Form, or table
datasheets? Do you use Combos?
 
Back
Top