queries- multipleaggregates

rick roberts

Registered User.
Local time
Today, 23:01
Joined
Jan 22, 2003
Messages
160
on creating an aggregate this leaves a variable as an answer --the variable cannot be used again in another aggregate within the same query -it seems a very fundemental request but i cant get around it without using further queries to change the variables to a constant - i can get around this by using crosstabs but then these cannot be used in a subform

ie. Total Price:[unit price]*[quantity] gives an aggregate but how do i get a sum of the Total Price that can be used in a subform without using a crosstab? the problem is compounded by the fact that i ned these answers for every id number
 
Since TotalPrice is returned by the Query you can Sum it in the subform footer. =Sum([TotalPrice]) as the control source for an unbound textbox
 
thanks for your input

now i have a problem if i want to use the resulting ansewr in another aggregate witihn a query --such as Grant Total of Units --and if i want to add vat onto that--- the problem carries on ad infinitum

another difficulty i find is that if i use a total or grouping within a query-- it leaves it in a state where no new records can be added???? --if i could cure that problem i may be able to build query upon query to solve the first
 
so i can have as many aggregates as i want in a report? for as many levels as i want? --presumably only in the report footer - can i inport data from a multiple of queries to obtain these aggregates?
 

Users who are viewing this thread

Back
Top Bottom