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.
:
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
:
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.
:
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
:
In a Vba procedure (Sub) for the subreport. I need this value from the
parent report to do some computations.
:
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
:
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!