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!

Moving subreports in the detail section of the report...

Status
Not open for further replies.

lamarw

MIS
Dec 18, 2002
223
US
The Question:
Is it possible to move subreports within the detail section of the main report. I have moved objects around the detail section but when I try to set the Reports_SubReport.top the message pop's up indicating the value is read-only. Is there another way to move sub reports.

The Reason Why:
I have two subreports that are now successfully printing, side-by-side, in the detail section of the main report. There are times when I'll need to print two other subreports which span the entire width of the detail section of the main report below the side-by-side reports, this works fine. However, when I don't need to print those subreports I want to turn off visibility and move them up then reduce the size of the main reports detail section to include only the height of the side-by-side reports in order to conserve real estate on the printed page. When I need to show the other full width sub_reports I would move them to the location I need them then turn on their visibility.
 
This code worked for me with a subreport named srptMoveMe in the detail section of the main report
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Me.srptMoveMe.Top = IIf(intUpDown = 0, 0, 1440)
    intUpDown = IIf(intUpDown <> 0, 0, 1440)
End Sub

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top