math functions in a query

G

Guest

I have a real challenge.

Two queries:

qryCompsFacs:
SELECT tblComplaints.DateReceived, tblComplaints.ProductionFacility
FROM tblFacilities INNER JOIN tblComplaints ON tblFacilities.txtFacilityID =
tblComplaints.ProductionFacility
WHERE (((tblComplaints.DateReceived) Between
[Forms]![frmComplaintQueriesReports]![BeginningDate] And
[Forms]![frmComplaintQueriesReports]![EndingDate]) AND
((tblComplaints.ProductionFacility)=[Forms]![frmComplaintQueriesReports]![cbFacility]))
OR (((tblComplaints.DateReceived) Between
[Forms]![frmComplaintQueriesReports]![BeginningDate] And
[Forms]![frmComplaintQueriesReports]![EndingDate]) AND
(([Forms]![frmComplaintQueriesReports]![cbFacility]) Is Null));

qryFacsCasesProduced:
SELECT tblFacilitiesCasesProduced.txtFacilityID,
Sum(tblFacilitiesCasesProduced.TotalCasesProduced) AS SumOfTotalCasesProduced
FROM tblFacilitiesCasesProduced
GROUP BY tblFacilitiesCasesProduced.txtFacilityID;

Now for the question:
How can I divide
[qryFacsCasesProduced].[Sum(tblFacilitiesCasesProduced.TotalCasesProduced) AS
SumOfTotalCasesProduced] by 100,000 and then divide that result by the total
number of records as filtered in [qryCompsFacs].[ProductionFacility]?

This one really has my head spinning! Anyone up to the challenge? I'd
appreciate any advice - THANKS!
 

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