P
Paul James
I've got a calculated field that consists of the expression
"=Count([lastname])" which works fine as long as there are some records in
the underlying record source. However, when there are no records to count,
the field displays the #Error value. I tried using the Null to Zero
function NZ() to eliminate the #Error:
=Count(nz([lastname]))
but that didn't work because I still got the #Error.
I also tried the following expression:
=IIf(Count([lastname])>=1,Count([lastname]),"no records for this
period")
but that still returns #Error when there are no records in the recordset.
Can anyone tell me how I can count the records and return a text string like
"no records" when the recordset is empty, instead of getting the #Error when
there are no records to count?
Thanks in advance.
Paul
"=Count([lastname])" which works fine as long as there are some records in
the underlying record source. However, when there are no records to count,
the field displays the #Error value. I tried using the Null to Zero
function NZ() to eliminate the #Error:
=Count(nz([lastname]))
but that didn't work because I still got the #Error.
I also tried the following expression:
=IIf(Count([lastname])>=1,Count([lastname]),"no records for this
period")
but that still returns #Error when there are no records in the recordset.
Can anyone tell me how I can count the records and return a text string like
"no records" when the recordset is empty, instead of getting the #Error when
there are no records to count?
Thanks in advance.
Paul