Hi,
I created a simple data base to count various task. Each field are Yes/No.
I'm unable to count into a report the amount of Yes for each row of a table.
Alex Dybenko - 18 Apr 2006 19:42 GMT
Hi,
if you fields have names like Task1, Task2, etc, then you can use following
loop:
for i=1 to 5
if me("Task" & i)= true then
Count=Count+1
end if
next
else - you can use me.Controls collection, iterate through it, determine
type of control - and then count checkboxes

Signature
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
> Hi,
> I created a simple data base to count various task. Each field are Yes/No.
> I'm unable to count into a report the amount of Yes for each row of a
> table.
Paul Overway - 24 Apr 2006 15:13 GMT
> Hi,
> I created a simple data base to count various task. Each field are Yes/No.
> I'm unable to count into a report the amount of Yes for each row of a
> table.
You need use count with a WHERE clause, i.e.,
SELECT Count(tblCustomer.Active) AS [Count]
FROM tblCustomer
WHERE (((tblCustomer.Active)=False));
Or if you wanted to use a domain function,
DCount("Active","tblCustomer","Active=True")