Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pull a field from a Subreport to the Main Report

Status
Not open for further replies.

Dontremb

Technical User
Jan 22, 2009
77
US
Ok, hopefully, this is a simple problem.

I have a report, with a subreport on it. This subreport has a field on it, and all I want to do, is reference that field in the main report.

That's it. From what I've been able to research, (which is nothing) this is completely impossible in every way.

So, if someone here can solve this little problem, you've basically done the impossible, and solved my problem once and for all.
 
Is this the same basic problem as several of your other posts? If so, you should stick with the other threads rather than starting a new one.

Also, when asking questions, it is important to use the correct terminology. Does your subreport have a "control" or "field" that you need to pull into your main report. I would think this would be a text box control.

Also, are the text box and subreport in the same section of the main report?

What is the name of the text box in the subreport?

What is the name of the subreport control on the main report? (this is not necessarily the same as the source object)

Duane
Hook'D on Access
MS Access MVP
 
This isn't exactly the same question. By asking the other questions, I have found out other things I might be able to do, so I'm trying to figure out how to do those specific things.

I need to pull a control or a field from the subreport. My main problem is that everything I have tried to do to pull anything from my subreport results in "#Name" sometimes asking me to explain what my subreport query means.

The text box and subreport are in the same section of my main report.

The name of the text box in the subreport is "Text7" (I know this isn't a good naming convention, I'm just trying to figure out HOW to do it first.)

The name of the subreport control on the main report is "rptTestor" (Interesting note: Until you actually ASKED me that question, dhookom, I had no idea that the subreport control actually HAD a name that COULD be different than it's report name.)

The text box in my main report that i'm TRYING to call the information from the subreport: control source: '=[Reports]![rptTestor]![Text7]'

Is it just syntax that I'm messing up? Also note that I do NOT have any Parent or Child relationships between the two reports.

Thanks for your continued help, dhookom.
 
Ok. I finally got it. It was a mix between finding the right syntax to call a subreport field, and not knowing that the subreport name could be different than the source report name (thanks, dhookom)

It works perfectly now, this is what the text box on the main report has as a control source:

=[rptTestor].[Report]![Text7]


That's it. Works great now. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top