I want to subtract the sum of all records in a table based on the value in a certain field from the the sum of all records that have a different value in that field (subtract the INs from the OUTs) as part of a report.
I have been able to create queries that produce the desired record sets, but when I make the query the control source for the text box on my report, they do not work.
=(select [weight] from "Cert" where [In/Out]="in")
I get a #Name? result on the report.
I can group the data correctly using the grouping function, but don't know how to subtract one group from the other.
I can also create the groupings I want with a crosstab query, but, again, don't know how to subtract the sum of one group from the sum of another group.
I have been able to create queries that produce the desired record sets, but when I make the query the control source for the text box on my report, they do not work.
=(select [weight] from "Cert" where [In/Out]="in")
I get a #Name? result on the report.
I can group the data correctly using the grouping function, but don't know how to subtract one group from the other.
I can also create the groupings I want with a crosstab query, but, again, don't know how to subtract the sum of one group from the sum of another group.