Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please help with this report

Status
Not open for further replies.

earnshaw

Technical User
Jan 31, 2002
76
GB
Hi there I have been trying to figure this out for ages but just keep getting incorrect figures. please help me.....

I have two calculations in a report that I am trying to combine together. I have got the two fields working which are

1)the total number of orders taken ** =Count(IIf([Call Generated Order]="Yes",0))+Count(IIf([Call Generated Order]="Would have placed",0)) **

2)the total number of payments taken ** =Count(IIf([Payment Value]>".0",0)) **

I am trying to work out the total number of records that placed an order and made a payment at the same time (not add the two together)

Many thanks for any help

cheers Jay
 
IIf() should always have 3 arguments. You are providing only the condition and the true value. You should include the value if false.

Should be as easy as 1-2-3 unless I have misunderstood.

1)=Sum(Abs([Call Generated Order]="Yes" OR [Call Generated Order]="Would have placed"))

Isn't Payment value a Numeric field? If so, don't compare to a string like ".0"
2)=Sum(Abs([Payment Value]>0.0))

3)=Sum(Abs(([Call Generated Order]="Yes" OR [Call Generated Order]="Would have placed") AND [Payment Value]>0.0))


Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top