Sub Report Question

S

Swarfmaker

I have a main report with 2 subreports , "subrptInternalTraining" and
"subrptExternalTraining"
This works just as expected. However, sometimes there is a blank sub report
as no training has been undertaken. In such a case I would like a label to
appear saying "No Training".
I've tried the following with no luck.

If IsNull(subrptInternalTraining) then
Me!Label8.visible = True
Else
Me!Label8.visible = False
EndIf

Any Ideas?

Iain
 
D

Duane Hookom

Use a text box with a control source like:
=IIf(subrptInternalTraining.Report.HasData,Null,"No records in Internal
Training")
 
B

bhicks11 via AccessMonster.com

I put it in the main report properties - data tab - filter. Also, in case
there is not data, in the no data property of the report, you can use this:

MsgBox "There is no data for this report. Cancelling report...", , "No Data
for Report"
Cancel = True

Bonnie
http://www.dataplus-svc.com
What even did you put this in?
[quoted text clipped - 18 lines]
I've tried this in both the Format and Print Events of the Detail section.
 
S

Swarfmaker

Thanks Duane, works a treat!!

Iain
Duane Hookom said:
Use a text box with a control source like:
=IIf(subrptInternalTraining.Report.HasData,Null,"No records in Internal
Training")
 

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