Calculating values from 2 subreports..................

J

JasonS

Hello! Can someone give me a hint regarding this problem?
I created 3 reports: Report1 - bount to some query, Report2 - also bound to
some other query, and Report3 - which is unbound.
The report3 opens Report1 and Report2 as its subreports.
There is Text1 field on Report1 and Text2 field on Report2.

I also created Text3 on Report3, which should add values form Text1 and
Text2.

Text3 control source is set to:
=Reports![Report1]![Text1] - Reports![Report2]![Text2]

But when I'm opening Report3, the Text3 shows only this message: #Name?

What did I do wrong?
Thank you for any help
 
M

Marshall Barton

JasonS said:
Hello! Can someone give me a hint regarding this problem?
I created 3 reports: Report1 - bount to some query, Report2 - also bound to
some other query, and Report3 - which is unbound.
The report3 opens Report1 and Report2 as its subreports.
There is Text1 field on Report1 and Text2 field on Report2.

I also created Text3 on Report3, which should add values form Text1 and
Text2.

Text3 control source is set to:
=Reports![Report1]![Text1] - Reports![Report2]![Text2]

But when I'm opening Report3, the Text3 shows only this message: #Name?

What did I do wrong?


Subreports (and subforms) are not open in their own right
and are not members of the Reports (or Forms) collections.

You must refer to the items in a subreport through the
subreport control on the main report:

=Report1.Report!Text1 - Report2.Report!Text2

Watch out for the names of the subreport controls, they may
be different from the name of the report that's displayed in
the subreport control.
 

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