A
allie357
I know that you cannot sum a calculated field in a query, and you can
do so on a report, but can you evaluate the report field to decide
which records are included?
I have a field that is counted in a query and it needs to be evaluated
at before the report is created. Only the records belonging to a person
with over a certain number of violations need to be shown. However with
my report I needed to do some ugly joining in the query to make it show
each records description as well as include the count, so i have to
join two queries.
Is there some way I can just have the report show the records whose sum
of the calculated field is equal to a number entered through a form
after the filter is applied?
Code:
--------------------------------------------------------------------------------
SELECT qry_Number_of_Violations_details.ViolatorName,
[qry_Violations_by_Violator_by Number of Times].CountOfPolicy_ID,
qry_Number_of_Violations_details.Policy,
qry_Number_of_Violations_details.CountOfPolicy AS [Violation Count],
qry_Number_of_Violations_details.Amount,
qry_Number_of_Violations_details.Description,
qry_Number_of_Violations_details.RCName,
qry_Number_of_Violations_details.DeptName,
qry_Number_of_Violations_details.DateEntered,
qry_Number_of_Violations_details.ViolatorsDepartmentNumber,
qry_Number_of_Violations_details.Violation_ID
do so on a report, but can you evaluate the report field to decide
which records are included?
I have a field that is counted in a query and it needs to be evaluated
at before the report is created. Only the records belonging to a person
with over a certain number of violations need to be shown. However with
my report I needed to do some ugly joining in the query to make it show
each records description as well as include the count, so i have to
join two queries.
Is there some way I can just have the report show the records whose sum
of the calculated field is equal to a number entered through a form
after the filter is applied?
Code:
--------------------------------------------------------------------------------
SELECT qry_Number_of_Violations_details.ViolatorName,
[qry_Violations_by_Violator_by Number of Times].CountOfPolicy_ID,
qry_Number_of_Violations_details.Policy,
qry_Number_of_Violations_details.CountOfPolicy AS [Violation Count],
qry_Number_of_Violations_details.Amount,
qry_Number_of_Violations_details.Description,
qry_Number_of_Violations_details.RCName,
qry_Number_of_Violations_details.DeptName,
qry_Number_of_Violations_details.DateEntered,
qry_Number_of_Violations_details.ViolatorsDepartmentNumber,
qry_Number_of_Violations_details.Violation_ID