How to create sum from combo boxes?

G

Guest

I want to create product accesories, like additions for PC, by using combo
boxes with item prices. Then based on all the accesories chosen with their
respective prices, I want to have the sum of those choices shown on the page
(form or report?). Which method is best: subform, menu bar, etc?

In other words it should look like this :
choose accessory 1: xxxxxxx price of chosen accessory 1: xxxxxxxxx
choose accessory 2: xxxxxxx price of chosen accessory 2: xxxxxxxxx
etc

Total for chosen accessories: xxxxxxxxxxx

Anyone who can help me do this?
 
G

Guest

If your price is included as a column in the combo boxes, lets say it is
column 2, then you could have a text box on the form with the control source
property set to
=Nz(Combo1.Column(1),0) + Nz(Combo2.Column(1),0) + Nz(Combo3.Column(1),0)
etc.
 
G

Guest

Not really. But I have managed to add another text box, thanks to you, that
will show the selected result from the combo box separately. I did it in
properties and set the control source to =(combo box). However, I dont know
how to set that text box to show price only. Simply because the combo box
has two columns, one text (item name) and the other price. So can you help
me set only the second column, the price? Afterwards it easy to do the sum
of all.

It looks like this:

combo box - (drop down list with two columns) text box - name of
item, but it should be price instead?

Thanks Dennis
 
G

Guest

Instead of setting the control source to =[ComboBox], set it to
=[ComboBox].Column(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

Top