Aggregate functions in form footer

karatelung

Registered User.
Local time
Today, 09:29
Joined
Apr 5, 2001
Messages
84
I have a continuous form that contains the field [StatusClient]. In the form footer I have the field =Count([StatusClient]). Is there a way that I can make that field only count the records where [StatusClient] = "client"? I want all records to be displayed, but I only want specific records to be counted.

The form is actually used as a subform, and I'll be referencing the value of =Count([StatusClient]) in the main form for another calculation.

Any help is greatly appreciated.

Richie
 
Hi Karatelung

I have made some assumptions ...
1.Your subform is based upon a query
2.Your value "client" won't be a variable criteria (i.e you will only ever want to count up those records with "client" in them)

In the query make a new column - a calculated field called Client, for example.

Client: IIf([ClientStatus]="client",1,0)

Then on your subform in the text box for the total use:

=Sum([Client])

HTH

Rich Gorvin
 
Thanks, Rich, your assumptions were correct, and it worked.

Richie
 

Users who are viewing this thread

Back
Top Bottom