View Single Post
  #3  
Old April 27th, 2008, 12:03 AM posted to microsoft.public.access.forms
[email protected]
external usenet poster
 
Posts: 96
Default Count - if statement....

On Apr 26, 6:47*pm, Steve Schapel wrote:
Learning_codes,

The syntax of the one that works and the one that doesn't are different.

Also, the use of the "Like" keyword here is not necessary, apparently,
as you have no wildcard.

Therefore, try:
="Completed: " & Sum(IIf([GroupA]="1",1,0)) & " of " & Count (*)

If I have misunderstood, perhaps you can give some more details of where
these textboxes are located, and what is the meaning of the fields such
as Answer and GroupA and GroupB and what is the relationship between them.

--
Steve Schapel, Microsoft Access MVP



wrote:
Hi,


I created a box called *TXT_Completed for me to put ="Completed: " &
Sum(IIf([Answer] like "1",1,0)) & " of " & Count (*)
*and it works.


I have four groups and I want to set like below and I'm not able to
make it work.


="Completed: IIf([GroupA] like "1",1,0)) & " of " & Count (*)
and
next one,


="Completed: IIf([GroupB] like "1",1,0)) & " of " & Count (*)


I'm struggling last two A and B. * Your help would be much
appreciated. *I don't know if I do the right thing.


Thanks- Hide quoted text -


- Show quoted text -


Thanks for getting back to me. My mistake.. it should be like this
but still not able to get the count.

="Completed: IIf([GroupA] like "Product A",Sum(IIf([Answer] like "1",
1,0)) & " of " & Count (*)
="Completed: IIf([GroupB] like "Product B",Sum(IIf([Answer] like "1",
1,0)) & " of " & Count (*)