nodata event

G

Guest

I have three subreports within one REPORT.

In the event that at least one of the three subreports will contain no data, the REPORT should still print. For example, sub1 and sub2 have data, but sub3 doesn't. I'd like to insert a "NoData" event on sub3 to call another report which simply contains a textbox stating "There are no training events at this time" (exact capability will exist for each sub).

In the event that no data exists for all three sub reports, a report will still print, with three textboxes stating "There are no ... events at this time".

QUESTION:

Is it as simple as ...

DoCmd.OpenReport "NoDataReport1", acViewPrint,

..... where there are three "NoDataReports".
 
S

Steve Schapel

JD,

I haven't tried it, but I don't think you can control this from the
subreport events. Here's one idea... put your little notice in a
textbox on the main report over the top of the subreport, and then, on
the OnFormat event of the section of the main report which contains the
subreport, something like this...
Me.txtNoSub1.Visible = Not Me.Sub1.HasData
 

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