Link to home
Start Free TrialLog in
Avatar of tmaususer
tmaususerFlag for United States of America

asked on

Help with a calculation in a report or query ms access 2003

I'm sure this is an easy one but being a novice here has me stumped. I created a simple form based off of one table (see attached). The form has to drop downs. One called area auditied the other status. The status drop down has three choices audits completed, safe audits, and unsafe audits. I created a calcuation query that will count the number of choices from the status drop down. So for example if I have three records and out of two of those records unsafe audits were chosen it shows a total of 2 in the query. I then created a report from my calculation query. So far very simple. Here is my issue that I cannot figure out. What I need to happen is have a calculation that gives me a percentage of unsafe audits. So my calculation should be unsafe audits / completed audits = the percentage. Can someone look at my attachement and fill in the blanks for me? Or if my query itself is not efficient you are more than welcome to change it. Hopefully I made sense
Avatar of tmaususer
tmaususer
Flag of United States of America image

ASKER

Sorry. Here is the attachment.
Safety.mdb
ASKER CERTIFIED SOLUTION
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I only did the calc in the query to show that it could be done.
Using the query may not be optimal, because it shows the same value for all records...
(You could probably get crazy and use a UNION query or some other technique though, to get a better output)

I prefer the "from table data" technique
You can use the same technique on your form.

There are a few other ways that this might be done more "elegantly", so let's see what the other experts post

;-)

JeffCoachman
No way I would have figured this one out. Thank you very much
glad I could help.
;-)

Jeff