Expression in a report

G

Guest

I have a report with a sub report. The report contains a "Grand Total"
figure which comes from a subreport. In another field on the mail report I
have to take this figure, subtract 8000, and multiply it by 15%. I cannot
get the expression to work out. This is one of the expressions I've tried:
=Child320.Report!([Amount Grand Total Sum]-8000*.15)
Something is wrong, but I cannot figure it out. I keep getting error
messages.

I keep
 
S

Steve Schapel

Ronnie,

What are the error messages?

I would try like this...
=([Child320]![Amount Grand Total Sum]-8000)*.15

This assumes that 'Amount Grand Total Sum' is the name of the control on
the subreport. This will produce an error if there are no subreport
records.

If this doesn't work, the next thing I would try is to do it in 2 steps
- have a hidden control on the main report, to directly reference the
total off the subreport, so let's say you name this hidden control
SubreportTotal and then the visible control on the report will have this
Control Source...
=([SubreportTotal]-8000)*.15
 
G

Guest

Almost! This is giving me 15% of 8000 rather than the grand total - 8000.
--
Ronnie


Steve Schapel said:
Ronnie,

What are the error messages?

I would try like this...
=([Child320]![Amount Grand Total Sum]-8000)*.15

This assumes that 'Amount Grand Total Sum' is the name of the control on
the subreport. This will produce an error if there are no subreport
records.

If this doesn't work, the next thing I would try is to do it in 2 steps
- have a hidden control on the main report, to directly reference the
total off the subreport, so let's say you name this hidden control
SubreportTotal and then the visible control on the report will have this
Control Source...
=([SubreportTotal]-8000)*.15

--
Steve Schapel, Microsoft Access MVP

I have a report with a sub report. The report contains a "Grand Total"
figure which comes from a subreport. In another field on the mail report I
have to take this figure, subtract 8000, and multiply it by 15%. I cannot
get the expression to work out. This is one of the expressions I've tried:
=Child320.Report!([Amount Grand Total Sum]-8000*.15)
Something is wrong, but I cannot figure it out. I keep getting error
messages.

I keep
 
G

Guest

No, I just had to put the "(" in the right spot. It's good now! Thanks for
your help!
 

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

Similar Threads


Top