Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / April 2008

Tip: Looking for answers? Try searching our database.

#Error from Count

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Leif - 21 Apr 2008 00:39 GMT
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
Duane Hookom - 21 Apr 2008 00:44 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.