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

Sub Report has no data

Status
Not open for further replies.

drewduncan

Programmer
Apr 3, 2003
38
0
0
GB
Anyone help??

Im opening a report which contains a sub report. The main (parent) report always has data but occasionally the sub (Child) report does not.

I would like the report not to open when the sub (child) report has no data in it.

I know there is the 'On No Data' Sub but not sure how to use it when the form with no data is a sub form.

Any help yet again greatly appreciated.

Cheers Drew.
 
You can check the HasData property of the subreport from the main report using syntax like:
If Me.srptMySub.Report.HasData Then
'do something
End If
I'm not sure which event of the main report would be the best. You may need to experiment and then report back.

Duane
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top