Access Form: Calculate percent

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

Fredg

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.
 

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