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

Supressing empty subreports in Access 2000

Status
Not open for further replies.
Oct 8, 1999
14
US
I have a main report in Access 2000 with a number of subreports. I get the correct data in each of the subreports. The subreports are empty when there's no data to report; however, I would like to suppress (not display) the empty subreports. I tried setting "Can Shrink" to Yes where possible, but Access still leaves blank lines for the subreports. Any suggestions?

Tbanks,
Howard
 
Add this code to each of your sub-reports...


Private Sub Report_NoData(Cancel As Integer)

Cancel = -1

End Sub
 
Interesting but I have no other code for any of my subreports so I'm curious as to what calls this subroutine.
 
I discovered that if I make the subreports as small as possible, the report will look fine.

Thanks anyway Pezamystik.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top