Report With Sub-Report

X

Xcelsoft

I have a report with a sub report and I would like to
control whether or not certain controls on the main
report are visible if there are no detail records in the
sub-report.

Any help will be appreciated.

Thanks
 
M

Marshall Barton

Xcelsoft said:
I have a report with a sub report and I would like to
control whether or not certain controls on the main
report are visible if there are no detail records in the
sub-report.


You can check the subreport's HasData property:

Dim bolHasRecords As Boolean
bolHasRecords = Me.subreportcontrol.Report.HasData
Me.textboxA.Visible = bolHasRecords
Me.textboxB.Visible = bolHasRecords
Me.textboxC.Visible = Not bolHasRecords
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top