Connecting Tech Pros Worldwide Help | Site Map

Only add Valid Payments on a Report.

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 13th, 2005, 01:28 PM
simonmarkjones@gmail.com
Guest
 
Posts: n/a
Default Only add Valid Payments on a Report.

Hi,

In a Report I add up amounts payed in on a certain date.
="£" & Sum([PaymentAmount])

I have just added a field called Void to the table this is a check box
data type yes/no.

The report shows a check box next to each each payment to show if it is
void or not.

What i would like to do is only add up the payments into the total text
box and dont add the void entries to this.

Do i have to do this within the initial query?

The query is called Print All Income and the fields within this query
are PaymentAmount and Void.

I tried to solve this myself but i'm am new to SQL. What i did was to
add a new field to the query called totalOfPaymentAmmounts
then tried doing the following
Select([PaymentAmount]FROM[Print All Income]WHERE[Void]=false)

I know this isnt right but am i on the right lines and can someone help
me.
Thankyou in advance!


  #2  
Old November 13th, 2005, 01:28 PM
Tom van Stiphout
Guest
 
Posts: n/a
Default Re: Only add Valid Payments on a Report.

On 7 Sep 2005 05:28:00 -0700, simonmarkjones@gmail.com wrote:

I would use the DSum function:
=DSum("PaymentAmount" "[Print All Income]", "Void=false")

-Tom.

[color=blue]
>Hi,
>
>In a Report I add up amounts payed in on a certain date.
>="£" & Sum([PaymentAmount])
>
>I have just added a field called Void to the table this is a check box
>data type yes/no.
>
>The report shows a check box next to each each payment to show if it is
>void or not.
>
>What i would like to do is only add up the payments into the total text
>box and dont add the void entries to this.
>
>Do i have to do this within the initial query?
>
>The query is called Print All Income and the fields within this query
>are PaymentAmount and Void.
>
>I tried to solve this myself but i'm am new to SQL. What i did was to
>add a new field to the query called totalOfPaymentAmmounts
>then tried doing the following
>Select([PaymentAmount]FROM[Print All Income]WHERE[Void]=false)
>
>I know this isnt right but am i on the right lines and can someone help
>me.
>Thankyou in advance![/color]

  #3  
Old November 13th, 2005, 01:32 PM
simonmarkjones@gmail.com
Guest
 
Posts: n/a
Default Re: Only add Valid Payments on a Report.

Great thankyou for that!

It works on the computer screen on the Report. However, If you try and
print this all i get is the £ printed out. Any ideas??

Thanks for your help.

  #4  
Old November 13th, 2005, 01:32 PM
simonmarkjones@gmail.com
Guest
 
Posts: n/a
Default Re: Only add Valid Payments on a Report.

Found the solution. I was putting ="£" & DSum("PaymentAmount" "[Print
All Income]", "Void=false")
on the Report in a Label. This worked fine except for when it came to
printing the report.

What i have now done is to create another field in my query
eg. TotalPayments:DSum("PaymentAmount" "[Print All Income]",
"Void=false")

Then on the Report all i had to do was... ="£" & [TotalPayments]

Yay!
ROCKIN!
Cheers Simon
www.simonband.co.uk

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.