DSum on report

Richio

Registered User.
Local time
Today, 22:24
Joined
May 31, 2002
Messages
75
Good Afternoon all

I have a report with a formula as below

=(DSum("[PriceGiven]","Results 1","[Sales Finance] = 'FI'"))+(DSum("[PriceGiven]","Results 1","[Sales Finance] = 'FD'"))

This is basically picking the data from the query Results 1 and adding the price given up where the result of FI and FD is in the sales Finance field.

My problem is .......it works if there are records for both FI and FD in the range chosen but if for example there are records for FI but no FD it does not display anything on the report.

Does anyone know a way around this? or a way of adding data up on a report for only a certain criteria?

Thanks
 
Use the Nz function ie

=Nz((DSum("[PriceGiven]","Results 1","[Sales Finance] = 'FI'")))+Nz((DSum("[PriceGiven]","Results 1","[Sales Finance] = 'FD'")))
 
Thanks, I will try this

But also, sorry if I appear stupid, I have seen the Nz function before and always wondered what it does - it does not give alot away in the help files.

Is there anywhere I can get a brief overview of its uses?

Richio
 

Users who are viewing this thread

Back
Top Bottom