How would I substract these 2 textbxs with a IIf statement

Joe8915

Registered User.
Local time
Today, 14:47
Joined
Sep 9, 2002
Messages
820
I have a report to which I am trying subtract 2 text boxes (TotalRec and subtotal)

In my Detail
I have a text box with the following in my control Source:
Name: TotalRec
=IIf([Copy Of QryContract Aging Report subreport].[Report].[HasData],[Copy Of QryContract Aging Report subreport].[Report]![TotalCount],0)

In my Footer
I have a text box with the following in my Control Source:
Name: subtotal
=Sum([CountOfID])

How would I substract my TotalRec from subtotal


I have tried several different ways with no results
 
Thanks for the quick reply, I sure have.
 
You can't use unbound controls in calculations. You need to repeat the calculation.
=IIf([Copy Of QryContract Aging Report subreport].[Report].[HasData],[Copy Of QryContract Aging Report subreport].[Report]![TotalCount],0) - Sum([CountOfID])
 
Pat, thanks for chiming in. Ok, now I got it to work. My next step is going to be a difficult one. I don’t know if I can even do it. I have attached a PDF trying to explain what I need to accomplish. I figure it was a lot easier to show visual and try to explain in writing.
Here is the bottom line, I need to take the number of Active Construction Contracts and subtract them each month to the following next month.

Example in May I started with 210 and 1 will expire, bringing to total down to 209. In the month of June now I have 209 total and 1 will expire in June, bringing to total down to 208. Then it just goes on from there.
Any ideas on how I can accomplish this?
 

Attachments

Users who are viewing this thread

Back
Top Bottom