View Single Post
  #2  
Old February 16th, 2010, 12:56 PM posted to microsoft.public.access.tablesdbdesign
BruceM via AccessMonster.com
external usenet poster
 
Posts: 448
Default Can we put two or three sets of data into one combobox?

The combo box displays only the bound column after the selection, although
the drop-down list can display several columns. Use text boxes to display
other columns. In the Control Source of a text box, something like:

=[ComboBoxName].Column(1)

Column numbering is zero-based, so Column(1) is actually the second column.

BTW, price is often a value that needs to be stored so that it shows the
price at the time of the transaction, which is not necessarily the current
price. In that case you can use the After Update event to the combo box:

Me.SalePrice = Me.ComboBoxName.Column(2)

SalePrice is a field name.

guangdew wrote:
In my database, I have Products table and Orders_Details table that contains
Product_ID field and they have one to many relationship.

On Orders_Details subform, I have a combobox Product_ID which is a bound
control. From the pulldown list, I can have Product_ID, Product_Name and
Price listed. After whichever product is selected, I want the combobox to
display both Product_Name and Price but it can show only the Product_Name
field.

I’m also thinking of use another unbound field to display the price
separately, but I have problem making it work.

Can anyone make some suggestions to me?

Thanks,

Guangdew


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/201002/1