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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Referencing sub-reportA from sub-reportB

Status
Not open for further replies.

PreacherUK

Technical User
Sep 26, 2002
156
NL
Hi guys,

I know this is possible but Access2K has decided to be unhelpful this morning :)

has anyone got the correct syntax/form for referencing one sub-report from another?

Cheers
 
If your main form is formA, 1st subform is FormB and 2nd subform is formC, and assuming your subforms are both on the main form, I think you use something like this:

Forms!formA!FormB or to reference formC Forms!FormA!FormC

If FormC is on FormB I think it should be:

Forms!FormA!FormB!FormC.

Let me know if it works for you.
 
Yeah, thats pretty much how I had it.

What prompted me to ask others was that I found having a control on reportA(main report) that referenced a control on a sub report I had to use [report]![SubReportB].[control] rather than [reportS]![SubReportB].[control]. Which by rights shouldn't work.

As sad as it sounds rebooting the pc and then re-running the report has appeared to magically make the report work...I never believed in fairys and magic before I started working with Access :)

Thanks for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top