Running Totals (1 Viewer)

dadrew

Registered User.
Local time
Today, 03:26
Joined
Sep 15, 2003
Messages
186
I have a number of forms and on each form there are a number of check boxes. I want to be able to add up how many check boxes read true. i.e if check1 = true then total = 1, if check2 = true then total now = two. Can I achive this?
 

ghudson

Registered User.
Local time
Yesterday, 22:26
Joined
Jun 8, 2002
Messages
6,194
Are you talking about a continuous form and you want to count all the check boxes in the record source for one field?

If so, use the DCount() function.

Search the Access Help files for the DCount() function for examples and more info on how to use criteria.

FYI

True or Yes = -1
False or No = 0
 

dadrew

Registered User.
Local time
Today, 03:26
Joined
Sep 15, 2003
Messages
186
No its not a continuous form. I need to count the number of records that have a true in the tick box. I know I need to use one of the count functions just not sure which one as i belive there are a few.
 

ghudson

Registered User.
Local time
Yesterday, 22:26
Joined
Jun 8, 2002
Messages
6,194
dadrew said:
No its not a continuous form. I need to count the number of records that have a true in the tick box. I know I need to use one of the count functions just not sure which one as i belive there are a few.
Does not matter if the form is continous or not. Use the DCount() function to count the number of "true" check boxes. You must use criteria to tell the DCount() which table to search and which field you want to count the number of true's [remember to use the -1 as your "true" criteria].

Search the Access help file for the DCount() function for examples and more info.
 

Users who are viewing this thread

Top Bottom