Counting field replacing the "error" value by "0"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have this counting field which returns the number of entries for each
result. When there is no result I would like to value for this field to be
zero, instead of the "error" word.
Any idea on how to do this is appreciated.

Thank you
 
Hi,
Thanks for your help. I have tried your formula without success, my counting
field is actually a calculating field: =Count([ReasonID]). I have tried to do
this =IIF(IsError([ReasonID]),0,[ReasonID]), but now all reasults are 0 which
is incorrect.

thanks for your time.

Dennis said:
Try this in your field

=IIF(IsError([CountingField]),0,[CountingField])

Chris said:
Hi,
I have this counting field which returns the number of entries for each
result. When there is no result I would like to value for this field to be
zero, instead of the "error" word.
Any idea on how to do this is appreciated.

Thank you
 
Have you tried

=IIF(IsError(Count([ReasonID])),0,Count([ReasonID]))

Chris said:
Hi,
Thanks for your help. I have tried your formula without success, my counting
field is actually a calculating field: =Count([ReasonID]). I have tried to do
this =IIF(IsError([ReasonID]),0,[ReasonID]), but now all reasults are 0 which
is incorrect.

thanks for your time.

Dennis said:
Try this in your field

=IIF(IsError([CountingField]),0,[CountingField])

Chris said:
Hi,
I have this counting field which returns the number of entries for each
result. When there is no result I would like to value for this field to be
zero, instead of the "error" word.
Any idea on how to do this is appreciated.

Thank you
 
Just tried it and this time it counts the results with values in them ok, but
still shows "error" when there are no returns.


Dennis said:
Have you tried

=IIF(IsError(Count([ReasonID])),0,Count([ReasonID]))

Chris said:
Hi,
Thanks for your help. I have tried your formula without success, my counting
field is actually a calculating field: =Count([ReasonID]). I have tried to do
this =IIF(IsError([ReasonID]),0,[ReasonID]), but now all reasults are 0 which
is incorrect.

thanks for your time.

Dennis said:
Try this in your field

=IIF(IsError([CountingField]),0,[CountingField])

:

Hi,
I have this counting field which returns the number of entries for each
result. When there is no result I would like to value for this field to be
zero, instead of the "error" word.
Any idea on how to do this is appreciated.

Thank you
 
I expect this might be caused by no records in the report??? Try
=IIf(HasData,Count([ReasonID]),0)

--
Duane Hookom
MS Access MVP
--

Chris said:
Just tried it and this time it counts the results with values in them ok,
but
still shows "error" when there are no returns.


Dennis said:
Have you tried

=IIF(IsError(Count([ReasonID])),0,Count([ReasonID]))

Chris said:
Hi,
Thanks for your help. I have tried your formula without success, my
counting
field is actually a calculating field: =Count([ReasonID]). I have tried
to do
this =IIF(IsError([ReasonID]),0,[ReasonID]), but now all reasults are 0
which
is incorrect.

thanks for your time.

:

Try this in your field

=IIF(IsError([CountingField]),0,[CountingField])

:

Hi,
I have this counting field which returns the number of entries for
each
result. When there is no result I would like to value for this
field to be
zero, instead of the "error" word.
Any idea on how to do this is appreciated.

Thank you
 
Thanks a lot, this time it has worked, brilliant!
Chris.

Duane Hookom said:
I expect this might be caused by no records in the report??? Try
=IIf(HasData,Count([ReasonID]),0)

--
Duane Hookom
MS Access MVP
--

Chris said:
Just tried it and this time it counts the results with values in them ok,
but
still shows "error" when there are no returns.


Dennis said:
Have you tried

=IIF(IsError(Count([ReasonID])),0,Count([ReasonID]))

:

Hi,
Thanks for your help. I have tried your formula without success, my
counting
field is actually a calculating field: =Count([ReasonID]). I have tried
to do
this =IIF(IsError([ReasonID]),0,[ReasonID]), but now all reasults are 0
which
is incorrect.

thanks for your time.

:

Try this in your field

=IIF(IsError([CountingField]),0,[CountingField])

:

Hi,
I have this counting field which returns the number of entries for
each
result. When there is no result I would like to value for this
field to be
zero, instead of the "error" word.
Any idea on how to do this is appreciated.

Thank you
 
Back
Top