One continous form, some with filter some without

2wistd

Registered User.
Local time
Yesterday, 19:25
Joined
Jan 17, 2013
Messages
66
So I have created a continuous form, with a list of names, phone number, office location etc on it. In front of it I have a column where you can select members status, ie: leave, TDY, Not contacted.

At the bottom I have a few calculations done using the code:

=Sum(IIf([recallstatus]="Leave",1,0))/Count([contacted]).

This gives me the percentage of members on leave. Works great.
The problem is I have buttons at the top that allows you to filter certain sections, so people are easier to find. Thing is, when these buttons are selected my math at the bottom also reflects that.

The information is pulled from a table called "permanentparty", and there is a query for this continuous form that is used. I figure i can pull the non-filtered data from the table "permanentparty", but I try to put it into the line of code above and it does not work.

Unless I am missing something major, this can't be that hard of a fix. I just want to that the filters do not mess with those numbers.
 
Try this shot in the dark:

=DCount("*", "permanentparty", "[recallstatus]='Leave'")/DCount("*", "permanentparty")
 
Perfect! Amazing how I started with DCount, found info about Sum, and had to go back to DCount.
 

Users who are viewing this thread

Back
Top Bottom