No Records in Reports

D

DS

If you have No records in a Sub-Report how do you get the report to read
Zero in the amount field? I set the fieldto Zero on the default, that
didn't work, I did an IIf statement on the Sub-Report and that gives me
a Zero Amount in the Total Field. However when I try to get that Zero
Amount to show up on the report footer of the main report I get an
Error#. Any suggestions?
Thanks
DS
 
P

PC Datasheet

It sounds like you have a field named Amount on the main report where you
want a 0 if there are no records in the subreport. Put the following code in
the NoData event of the subreport:
Me.Parent!Amount = 0
 
D

DS

PC said:
It sounds like you have a field named Amount on the main report where you
want a 0 if there are no records in the subreport. Put the following code in
the NoData event of the subreport:
Me.Parent!Amount = 0

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com
Thanks,
Itried putting Me.Parent!Amount=0
It didn't work. It coldn't find me.
Basically I need the sub report to come up with zero values even if
there isn't a record.
Thanks
DS
 
P

PC Datasheet

Did you put the suggested code in the subreport? If you did, then check your
code again, there's something wrong. "Me" is the reference to the object
that contains the code and therefore always exists!

You might open a code module and check to be sure you don't have a missing
reference. Go to Tools - References.
 

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