Access Form: Calculate percent

  • Thread starter Thread starter Diane
  • Start date Start date
D

Diane

Can a simple percent be calculated when entering data into
a form field. ie. Total: 25 Completed: 15 Percent
completed: Completed/Total = % Completed? Thanks.
 
You can compute it on the form, you can compute it in a report,
you can compute it in a query, but you cannot compute it
in a table. Nor should you save the computation in a table as long as the
[Completion] and [Total] data are stored in the table, or
[Total] can itself be computed.

To compute the percentage on a form, add an unbound control to the form.
Set it's control source to:
=[Completed] / [Total]

Set the Format property of the control to Percent.

If you are not storing [Total] but have a means to calculate total, you can
use:
=[Completed] / DCount("*","Tablename")

If you had 25 records in the table named TableName the calculation would be
=15/25

Whenever you need to see this percentage again, re-run the calculation.
 
Back
Top