#Error on Count

  • Thread starter Thread starter Rachel1
  • Start date Start date
R

Rachel1

Guest
Hi,

I am having problems with count. I am trying to count the number of names on a report this works fine. However when there are no names to count on the report the count field returns
#Error.

I have tried using an IIF statement with no luck.

at the moment I have

=Count([Last Name])
I need to tell it something to display zero when there is nothing to count.

Cheers,

Rachel.


Follow Ups:
 
Hi Rachel1

Try the following:

=IIf(IsError([LastName]),"0",Count([LastName]))

Please note that my field name has no spaces - LastName instead of Last Name.

Another thing to try:

If your text box on your report is also called Last Name (or even LastName) this can create a problem as the field itself has that name. Rename the text box to txtLastName.

HTH


Rich Gorvin
 
Rich,

Thank you so much it worked. All I needed to do was rename the text box and put you formula in.

Thanks again,


Rachel
 

Users who are viewing this thread

Back
Top Bottom