How to refer to a text box on a subreport

G

Guest

Hi all:
What I would like to know is how to from the main repor, refer to a text box
from a sub-report. I have used the “Expression Builder†to make the
reference but only end up with “#Name?†as the returned value when the main
report is ran. Yet when the sub-report is ran the text box I am referring to
shows the correct calculated value.

The name of the sub-report is: qrWipMaterialSum subreport
The name of the text box on the sub-report is: txtLabourSub

The expression used to reference the text box on the sub-report I have tried
is:
=[Reports]![qrWipMaterialSum subreport]![txtLabourSub]

Can some one please tell me what I have done wrong or why all I get is
“#Name?�

Any help would be greatly appreciated.

Thanks,
FatMan
 
D

Duane Hookom

Try:
=[qrWipMaterialSum subreport].[Report]![txtLabourSub]
This assumes your subreport control is named the same as the subreport and
the text box and subreport are in the same main report section.
 
G

Guest

Duane:
Thanks you were right on target.
Thanks,
FatMan

Duane Hookom said:
Try:
=[qrWipMaterialSum subreport].[Report]![txtLabourSub]
This assumes your subreport control is named the same as the subreport and
the text box and subreport are in the same main report section.

--
Duane Hookom
MS Access MVP


FatMan said:
Hi all:
What I would like to know is how to from the main repor, refer to a text
box
from a sub-report. I have used the "Expression Builder" to make the
reference but only end up with "#Name?" as the returned value when the
main
report is ran. Yet when the sub-report is ran the text box I am referring
to
shows the correct calculated value.

The name of the sub-report is: qrWipMaterialSum subreport
The name of the text box on the sub-report is: txtLabourSub

The expression used to reference the text box on the sub-report I have
tried
is:
=[Reports]![qrWipMaterialSum subreport]![txtLabourSub]

Can some one please tell me what I have done wrong or why all I get is
"#Name?"?

Any help would be greatly appreciated.

Thanks,
FatMan
 

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