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

Select particular subreport

Status
Not open for further replies.

xlStar

Technical User
Nov 16, 2003
55
GB
I am (trying) to design one Main Report with a sub-report containing Financial Information.

However, there are 6 different Financial Information subreports and only one is required.

How do I get the Main Report to select one particular subreport?

The Main Report included a UnBound subreport called subReport2, I am trying to use the Main Report's On Open event procedure to 'control' the "Source Object" on subReport2 but no joy.

Is there a way?
 
There may be a way, but one alternative is to have all the subreports on the main report and then use vba to make the particular subreport you would like to display visible and the others not visible.

Me.SubRep1.Visible = False
Me.SubRep2.Visible = True

Are the formats of the subreports the same? Same cols layout etc. Then you could change the query record source rather than the report record source and then you would only need one subreport and have that subreport's record source be changed.
 
Thank you.

I've managed to work it out by...

Me.subReport2.SourceObject = "subR2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top