calculations?

  • Thread starter Thread starter Todd
  • Start date Start date
T

Todd

I have a form (All deficiencies) that gets its data from a
Table (Table3). I also have a form (Open deficiencies)
based on a query looking for closed date with criteria =
Null. How can I take the data from All deficiencies and
from Closed deficiencies and calculate % complete?

Todd
 
If I understand you correctly, both sets of data come from Table3. The non
complete items have a value other than Null in the specified field and the
completed items have a value of Null. So, what you need to find is what
percentage the Nulls are of the total record count.

(DCount("*", "Table3") - DCount("[Field]", "Table3")) / DCount("*",
"Table3")

DCount won't count Null values unless you use the *, so the 2nd DCount will
return the number of non-Null values in the field and subtract it from the
total number of records in the table. This will give you the number of Null
values. Next, divide by the total number of records in the table. This will
give you the percentage in decimal format (i.e. 25% = 0.25).
 
Back
Top