No Records in Reports

  • Thread starter Thread starter DS
  • Start date Start date
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
 
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 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
 
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.
 
Back
Top