Full Version: If then statement needed for Access Report
UtterAccess Discussion Forums > Microsoft® Access > Access Reports
edfafc
Hello all,

I am running a report with two specific columns that I need to calculate.

The first column is called District and it will have a value of either 1 or 3.
The second column will be AmountPaid and it is set for currency.

I am trying to get my report to calculate out the sums for each district.
if District = 1 then sum(amountpaid)
if District = 3 then sum(amountpaid)

Any suggestions?
Thanks
Larry Larsen
HI
Try this in an unbound control..
Control Source..
=Sum(IIf([District]=1,[AmountPaid],0))

thumbup.gif
edfafc
That works great!
Thank you very much for your help.
Larry Larsen
Hi
You're welcome..
thumbup.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.