How do I - Pull data from Combo Box

K

KB

I've written a custom program in Access for my wife's small business.
Others with the same business use the program as well, and I volunteer
to improve it.

I've got an order detail area in which users can select the product
ordered, enter a sale price, etc. The order detail subform is linked
to the order detail table, while the combo looks into the product
table, and populates part of order detail record.

Until now, I'd not provided the catalog price (only a sale price
over-ride). I want to also include the catalog price (and provide a
running total below) in the dataview, but this is in the product table
(combo box).

I'm been fighting with trying to get the price out of the combo box
(in the combo box sql query I've added the price field) and populate
an unbound textbox in the form.

I've looked into control.value, itemdata, column this & that and I'm
stumped. Suggestions?
 
S

Sergey Poberezovskiy

Assuming that your price is stored in the third column of
your ComboBox's query, you could use
ComboBox1.Column(2)
to get the price
 
K

KB

Yup, works like a charm. TNX!

Assuming that your price is stored in the third column of
your ComboBox's query, you could use
ComboBox1.Column(2)
to get the price
 

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

Top