P
pepenacho
Hello:
I can't get an IIF function to work in the Access report footer. I can't
figure out why, I've written many of these and this one refuses to work.
Background:
I have two queries.
Qry-A has all the details for categories and amounts.
Let's say these are the fields in Qry-A:
Cat Amt1 Amt2 Amt3
Qry-B is Qry-A that is grouped by category and the amounts are summed up.
Instead of 500 lines (Qry-A) I have a nifty 12 lines (Qry-B).
Let's say these are the fields in Qry-B:
Cat SumOfAmt1 SumOfAmt2 SumOfAmt3
I wrote a report driven off of Qry-B (the 12 liner).
The report displays amts. for all 12 lines, and in the report footer I have
grand totals for each field (so sums for amounts in each field 1-3, where 12
lines are summed up into 1 number)
One category is special.
I want to flesh out that one category and display it separately in the
report footer.
In the report writer, I tried using various forms of
=IIF([Qry-B]!Cat = "ABC", SUM([Qry-B]!SumOfAmt1))
the control box in the report will simply not take it. I tried tweaking it
=IIF([Qry-B].Cat = "ABC", SUM([Qry-B].SumOfAmt1))
=IIF([Qry-B]!Cat Like "*ABC", SUM([Qry-B]!SumOfAmt1))
etc etc....
I even wrote a query just to get that one total and map it via the function
dialogue box .... nothing.
Nothing works.... I don't get it..
Any ideas?
I can't get an IIF function to work in the Access report footer. I can't
figure out why, I've written many of these and this one refuses to work.
Background:
I have two queries.
Qry-A has all the details for categories and amounts.
Let's say these are the fields in Qry-A:
Cat Amt1 Amt2 Amt3
Qry-B is Qry-A that is grouped by category and the amounts are summed up.
Instead of 500 lines (Qry-A) I have a nifty 12 lines (Qry-B).
Let's say these are the fields in Qry-B:
Cat SumOfAmt1 SumOfAmt2 SumOfAmt3
I wrote a report driven off of Qry-B (the 12 liner).
The report displays amts. for all 12 lines, and in the report footer I have
grand totals for each field (so sums for amounts in each field 1-3, where 12
lines are summed up into 1 number)
One category is special.
I want to flesh out that one category and display it separately in the
report footer.
In the report writer, I tried using various forms of
=IIF([Qry-B]!Cat = "ABC", SUM([Qry-B]!SumOfAmt1))
the control box in the report will simply not take it. I tried tweaking it
=IIF([Qry-B].Cat = "ABC", SUM([Qry-B].SumOfAmt1))
=IIF([Qry-B]!Cat Like "*ABC", SUM([Qry-B]!SumOfAmt1))
etc etc....
I even wrote a query just to get that one total and map it via the function
dialogue box .... nothing.
Nothing works.... I don't get it..
Any ideas?