calculations?

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
 
W

Wayne Morgan

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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top