RE: Subreport parent reference
- From: Duane Hookom <duanehookom@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 19 Dec 2008 10:39:01 -0800
I just placed a text box in a subreport with a control source of
=[Parent].[CustomerID]
This worked exactly as I expected showing the CustomerID from the main report.
Is the name of your text box actually "txtBox"?
What is the name of the text box on the subreport?
--
Duane Hookom
Microsoft Access MVP
"MarianneZ" wrote:
Well, I guess because I'm reading impaired. I did try "=Parent.txtBox"; same.
error message, "#Name?" in referring text box. And when I tried
"=Parent.Report.txtBox", I got the same error plus "#Error" in the text box.
Surely there must be a way to do this.
"Duane Hookom" wrote:
I'm not sure why you didn't try either of the two expressions I suggested.
Neither of mine included "Me." or "Reports.MainReport."
--
Duane Hookom
Microsoft Access MVP
"MarianneZ" wrote:
I tried an invisible text box (actually I left it visible for testing), with
=Me.Parent!txtBox and =Me.Parent.Report.txtBox and
=Reports.MainReport.txtBox. Got the same error message for all 3 of these.
The temporarily visible text box displays #Name? or othertimes #Error.
"Duane Hookom" wrote:
You might want to use an invisible text box in the subreport with the control
source as I suggested. Then reference the value of the invisible text box in
your code.
--
Duane Hookom
Microsoft Access MVP
"MarianneZ" wrote:
In a Vba procedure (Sub) for the subreport. I need this value from the
parent report to do some computations.
"Duane Hookom" wrote:
Where are you attempting to use this value? You should be able to reference
the value of a text box from the parent report with an expression like:
=Parent.txtBox
or possibly
=Parent.Report.txtBox
You aren't printing forms are you?
--
Duane Hookom
Microsoft Access MVP
"MarianneZ" wrote:
In a subreport Sub I am trying to pick up the value of a field in the parent
report, using Me.Parent!txtBox. I get an error saying You can't reference a
property for a control unless that control has focus. This control is in the
detail section of my main report and I'm in the Detail section of my
subreport.
So is this possible or do I have to pass the info somehow to the subreport?
If so, how? Or make its value a global?
Aaaaargh!
- Follow-Ups:
- RE: Subreport parent reference
- From: MarianneZ
- RE: Subreport parent reference
- References:
- Subreport parent reference
- From: MarianneZ
- RE: Subreport parent reference
- From: Duane Hookom
- RE: Subreport parent reference
- From: MarianneZ
- RE: Subreport parent reference
- From: Duane Hookom
- RE: Subreport parent reference
- From: MarianneZ
- RE: Subreport parent reference
- From: Duane Hookom
- RE: Subreport parent reference
- From: MarianneZ
- Subreport parent reference
- Prev by Date: Re: Best Way to Create Custom Filtering on a Report
- Next by Date: RE: Formatting
- Previous by thread: RE: Subreport parent reference
- Next by thread: RE: Subreport parent reference
- Index(es):
Relevant Pages
|
Loading