Help with count and IIf in report (1 Viewer)

anto.danny

Registered User.
Local time
Today, 02:42
Joined
Nov 8, 2015
Messages
35
hello

My report has repeated numbers '30' '90' '180' in a column. I want to count the number of times 30 is repeated, so I made a unbound textbox and added below expression in control source.

Code:
=Count(IIf([Maint Due Jan]="30",0))

this throws #Error in report view.:banghead::banghead::banghead::banghead::banghead:
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 17:42
Joined
May 7, 2009
Messages
19,169
if [Main Due Jan] is numeric:

=Count(IIf([Maint Due Jan]=30,0))
 

anto.danny

Registered User.
Local time
Today, 02:42
Joined
Nov 8, 2015
Messages
35
I tried that earlier and its not working...I still get #Error:banghead::banghead::banghead::banghead:
 
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 17:42
Joined
May 7, 2009
Messages
19,169
check the control name. did you include [Maint due jan] in the report?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 17:42
Joined
May 7, 2009
Messages
19,169
go to Property->Other of this control and rename it to anything, ie, txtMaintDueJan. then on your expression:


=Count(IIf([Maint Due Jan]=30,0))
 

anto.danny

Registered User.
Local time
Today, 02:42
Joined
Nov 8, 2015
Messages
35
I figured it out. I placed the textbox on page footer instead of the report footer:p. Thanks you for the help.
 
Last edited:

Users who are viewing this thread

Top Bottom