R
Robbro
I'll do my best to explain this database but its getting complicated. I
have 11 tables that I'm using to calculate cost of yarn. I have a crosstab
query that works perfectly to calculate my overhead expenses sort of as
follows:
Lot water power labor maintenance etc...
I need to add one more calculation on the end for a cotton rebate (part of
the rebate must be applied to overhead). So far I try to link Lot from my
query to lot in lotblend table (I just have lot #'s and blendcodes in this
table), then from blendcode in lotblend to blendcode in my blendcode table
which is laid out as follows:
blendcode material % waste type
1A ab 40 5 cot
1A pb 50 1 poly
1A bb 10 5 cot
etc.....
The rebate calculation is for cotton only its rebate rate*%/(1-waste) and I
can get this into a query and calculate the correct number, my only problem
is that when I do this the query goes to showing 3 instances of each lot
number and calculating the rebate amount for each material when I just want
one number for the lot. I have tried using the sum function but then i get
"You tried to execute a query that does not include the specified expression
"Lot" as part of an aggregate function"
have 11 tables that I'm using to calculate cost of yarn. I have a crosstab
query that works perfectly to calculate my overhead expenses sort of as
follows:
Lot water power labor maintenance etc...
I need to add one more calculation on the end for a cotton rebate (part of
the rebate must be applied to overhead). So far I try to link Lot from my
query to lot in lotblend table (I just have lot #'s and blendcodes in this
table), then from blendcode in lotblend to blendcode in my blendcode table
which is laid out as follows:
blendcode material % waste type
1A ab 40 5 cot
1A pb 50 1 poly
1A bb 10 5 cot
etc.....
The rebate calculation is for cotton only its rebate rate*%/(1-waste) and I
can get this into a query and calculate the correct number, my only problem
is that when I do this the query goes to showing 3 instances of each lot
number and calculating the rebate amount for each material when I just want
one number for the lot. I have tried using the sum function but then i get
"You tried to execute a query that does not include the specified expression
"Lot" as part of an aggregate function"