Subreports

K

Kat3n

I have a report that has several subreports. I need to know how to make the
text on the subreports display on the main report even if there is no data in
the subreports. Thanks.
 
D

Duane Hookom

The typical solution is to enter the "text" into text boxes on the main
report with control sources like:
=IIf(sbrptCtrlName.Report.HasData, Null,"Text From SubReport")
 
K

Kat3n

Thanks Duane. At this point I have tried so many things my mind is jello. I
tried your solution and I get an 'invalid syntax error'. Please take a look
and tell me what I am doing wrong.
=IIf(not-reps-y.qryreps-not.HasData, Null, "SHOULD REPRESENTATIVES BE
NOTIFIED?:"
not-reps-y=text box on the subreport
qryreps-not=my subreport
 
E

Evi

You'll definitely need square brackets around each of your control names if
you want to use dashes in them. Access uses dashes to indicate minus.
Try
=IIf([qryreps-not].Report.HasData, Null, "SHOULD REPRESENTATIVES BE
NOTIFIED?:")

and don't forget the closing brackets

Note that I've missed out the name of your text box..It sounds from your
initial enquiry that you want to test if the whole subreport has data rather
than if one field is blank.

If you want to check if a particular field in your subreport is blank, you
need a different function.

Evi
 

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