FollowUp: when subreport used as textbox source has no data

N

Nancy Lytle

Thanks to everyone's help I was able to get the information from the
sometimes empty subreport to fill out my calculations.

Now the tricky part: I need to use the same calculation for an "overall"
report Total - in the Report Footer. This is what I have so far:

Code:
=Sum([InitialAuthorization])+Sum([AuthorizationChanges])-IIf([rptExec_SP].[R
eport].[HasData],[rptExec_SP].[Report]![SumOblg],0)

I know this is wrong but I have tried:
=Sum([InitialAuthorization])+Sum([AuthorizationChanges])-Sum(IIf([rptExec_SP
].[Report].[HasData],[rptExec_SP].[Report]![SumOblg],0)) - it doesn't
recognize the subform (it is in the ProgramCode Footer)

and

=Sum([InitialAuthorization])+Sum([AuthorizationChanges])-IIf([rptExec_SP].[R
eport].[HasData],Sum([rptExec_SP].[Report]![SumOblg]),0) - This one causes a
passive crash (can't do anything - it thinks code is running)

Any ideas anyone?
TIA
Nancy L
 
D

Duane Hookom

You need to create a duplicate text box with the same control source. Set
this new one's Running Sum to Over All and name it txtDHRunSum. In the
report footer, place a text box with a control source of =txtDHRunSum.
 
N

Nancy Lytle

That worked like a charm, thanks very much, that was the one combination I
had not tried.
Saved me a couple of hours frustration.

Thanks again,
Nancy L
Duane Hookom said:
You need to create a duplicate text box with the same control source. Set
this new one's Running Sum to Over All and name it txtDHRunSum. In the
report footer, place a text box with a control source of =txtDHRunSum.

--
Duane Hookom
MS Access MVP


Nancy Lytle said:
Thanks to everyone's help I was able to get the information from the
sometimes empty subreport to fill out my calculations.

Now the tricky part: I need to use the same calculation for an "overall"
report Total - in the Report Footer. This is what I have so far:

Code:
=Sum([InitialAuthorization])+Sum([AuthorizationChanges])-IIf([rptExec_SP].[R
eport].[HasData],[rptExec_SP].[Report]![SumOblg],0)

I know this is wrong but I have tried:
=Sum([InitialAuthorization])+Sum([AuthorizationChanges])-Sum(IIf([rptExec_SP
].[Report].[HasData],[rptExec_SP].[Report]![SumOblg],0)) - it doesn't
recognize the subform (it is in the ProgramCode Footer)

and
=Sum([InitialAuthorization])+Sum([AuthorizationChanges])-IIf([rptExec_SP].[R
eport].[HasData],Sum([rptExec_SP].[Report]![SumOblg]),0) - This one
causes
a
passive crash (can't do anything - it thinks code is running)

Any ideas anyone?
TIA
Nancy L
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top