I'm trying to show a total count of the records in a report. In the report
footer I have the function "=Count([pmocid])" where pmocid is a field in the
report detail. Works fine until there are no records in the report. Then I
get a "#Error". I tried =Count("*") instead, but I got the same error.
Anyway to trap this problem and drop in a zero, or another way around the
problem?
Thanks,
Leif
Check for HasData
=IIf([HasData],Count(*),0)

Signature
Duane Hookom
Microsoft Access MVP
> I'm trying to show a total count of the records in a report. In the report
> footer I have the function "=Count([pmocid])" where pmocid is a field in the
[quoted text clipped - 5 lines]
> Thanks,
> Leif
Leif - 21 Apr 2008 17:04 GMT
Thanks, that's a new one for me. So the HasData is like a pseudo column?
> Check for HasData
> =IIf([HasData],Count(*),0)
[quoted text clipped - 8 lines]
> > Thanks,
> > Leif
Duane Hookom - 21 Apr 2008 17:48 GMT
HasData is a property of the report. This property will return true or false
depending on if the report's recordsource has any records.

Signature
Duane Hookom
Microsoft Access MVP
> Thanks, that's a new one for me. So the HasData is like a pseudo column?
>
[quoted text clipped - 10 lines]
> > > Thanks,
> > > Leif