UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> If then statement needed for Access Report    
 
   
edfafc
post Nov 27 2007, 05:40 AM
Post #1

New Member
Posts: 15



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
Go to the top of the page
 
+
Larry Larsen
post Nov 27 2007, 05:53 AM
Post #2

UA Editor + Utterly Certified
Posts: 22,725
From: Melton Mowbray,Leicestershire (U.K)



HI
Try this in an unbound control..
Control Source..
=Sum(IIf([District]=1,[AmountPaid],0))

(IMG:http://www.utteraccess.com/forum/style_emoticons/default/thumbup.gif)
Go to the top of the page
 
+
edfafc
post Nov 27 2007, 06:20 AM
Post #3

New Member
Posts: 15



That works great!
Thank you very much for your help.
Go to the top of the page
 
+
Larry Larsen
post Nov 27 2007, 07:56 AM
Post #4

UA Editor + Utterly Certified
Posts: 22,725
From: Melton Mowbray,Leicestershire (U.K)



Hi
You're welcome..
(IMG:http://www.utteraccess.com/forum/style_emoticons/default/thumbup.gif)
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 19th June 2013 - 12:08 AM