SUM Product Prices By Dealer and Date of Purchase

vdanelia

Registered User.
Local time
Today, 06:15
Joined
Jan 29, 2011
Messages
215
Hello Friends, I need your help..
on My form i want to implement smart sum filter by Dealer and Date of purchase (fields are dateofpurchase and dealer) I created unbound text box where i want the sum to be displayed... (I think that I need DSum function) I tried in such way =DSum("UnitPrice","DATA", "Dealer", "Dateofpurchase") something wrong

Thank you in Advanced
 
Last edited:
Not worked, I tried many variants
 
Post one and we'll fix it (note at the bottom of that link is a multi-field example). What are the data types of the 2 fields in the criteria?
 
Ohh, Can't figured out this Expressions........

=DLookup ("UnitPrice","DATA" & "Dealer","DATA", "Dateofpurchase")

I also Tried

=DSum ("UnitPrice","DATA" & "Dealer","DATA", "Dateofpurchase")


=DCount("*","DATA","Dealer = """ & [Dealer] & """ And Unitprice = """ & [Unitprice] & """ And Dateofpurchase = #" & [Dateofpurchase])
 
Last edited:
Try

=DSum("UnitPrice","DATA" & "Dealer = '" & Dealer & "' AND Dateofpurchase = #" & Dateofpurchase & "#")
 
You never answered my question about the data types, so I guessed. Can you post the db?
 
I'll Explain what i need:

My main table is DATA with fields: Dealer (entered the companies, from where the products were bought) data type text
Unitprice (the price of the product) data type Number
dateofpurchase (the date when the product was bought) data type date/time
 
Oops, I had a typo in there. Try

=DSum("UnitPrice","DATA", "Dealer = '" & Dealer & "' AND Dateofpurchase = #" & Dateofpurchase & "#")
 
No problem, and sorry for the typo. Fat fingers and slow eyeballs. :p
 

Users who are viewing this thread

Back
Top Bottom