Sum with Iif in report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,

Have one question.
I have database with fields Item_description, Item_price, Item_quantity,
Purchase_Date.
Want to make a sum in report only for those Items which were purchased on a
certain date for instance only for those whose Purchase_date is equal or
greater that 2/2/2005. Think I should use Sum function with Iif but how to to
that in report?

Triying to do following but it didn't work.
=Sum([Item_price])Iif([Purchase_Date]>= 2/2/2005)

Thank you in advance
Regards
Alex

P.S. Please don't laugh at my cause I am new in Access :)
 
It's a mad thing but think I am answering myself :)))

I wrote the following

=Sum(IIf([PurchaseDate]>=#2/2/2005#,[Price],0))

and that's it, it worked perfectly
It summurized my price only for those items whose purchase date was equal or
greater than 2/2/2005.

I am little proud of myself :)))
 
Back
Top