Count Problem

diazr

Registered User.
Local time
Today, 15:14
Joined
Jul 31, 2008
Messages
24
Can someone give me a hand on the below code, Im missing something but im not getting it. Im getting a invalid syntax "You may have entered an operand without an operator".


form104Count: IIf([FORM104]='YES',Count[FORM104])
 
It may be two things...
A you need to use a (if this is not true) clause
IIf([FORM104]='YES',Count[FORM104], (else do this)
B Not sure if you can count like that in an if statement
 
Last edited:
Can someone give me a hand on the below code, Im missing something but im not getting it. Im getting a invalid syntax "You may have entered an operand without an operator".


form104Count: IIf([FORM104]='YES',Count([FORM104])


I am not sure that this can work because the IIf function requires three parameters (IIf({Something to test}, {Value if TRUE}, {Value if FALSE})), and you only have two, but you can try adding the "(" and ")" where indicated above.

Also, you may not be able to use a group function like that in an IIf statement.
 
Code:
form104Count: IIf([FORM104]="YES",Count[FORM104],"Not Counted")

By putting in a false, you get feedback that it is working.

If FORM104 is a Yes/No data type then use: [FORM104] = True

-dK
 

Users who are viewing this thread

Back
Top Bottom