Combobox -> textbox/field ?

  • Thread starter Thread starter SpookiePower
  • Start date Start date
S

SpookiePower

I have made a combobox that shows some items from
a tabel and the prices on the different items. When the user
select a item I want the price to be showed in the field to the
right of the combobox. See this picture if you dont understand -
www.activewebsite.dk/download/access.jpg

I made this field because when I made the combobox
I could choose where to put the result from the combobox,
but it seems to me that it is not the prices that is displayed in
the combobox, but the number that the item is, in the combobox.

How do I put the price in the field and not the number ?
 
Make the textbox a calculated control by putting an equation in for its
Control Source. This equation will point to the column of the combo box that
has the price. When you make the selection, the textbox will update
automatically.

Example:
=[cboMyCombo].[Column](1)

The column property is zero based, so 1 would be the second column. If the
first column is a hidden column, placing the price in the 3rd column, you
would use 2 instead of 1.
 
In design view, in the properties of the combo box on the format tab, adjust
the column widths to show either both columns or only 1. For example, for
both - Column Widths: 1";1" or for only the prices: 0";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

Back
Top