sum of values selected in combo - to display in a text box

P

Patrick

hello,
I have a form with a combo listing a set of products.
I want to display the sum of products sold in all the
past years (there are 5 years sales records available) in
a text box based on the selected product.
The table behind the form gives the number of products
sold every month.

How do I create this??

Thanks for aour help

Patrick
 
D

Dennis

In your Text Box make the control source like this
=DSum("[SalesPrice]","[SalesTable]","[Product] = '" & Me.ComboBox & "'")

Substitute your field, table and combo box names as required.
 
Top