K
katsup
I’ve built a multi-table query called qryRetreatFees which selects out all
the retreat fees recorded for one individual retreat participant from all
participants. Additionally it shows the pricing factors (family type,
duration of stay) that determine each fee. The query works accurately on my
test data, producing the following results:
Registrant FeeID RegistrantType Duration Fee
Tom Thumb 1 TwoAdults:2teens OneFullDay $315.00
Tom Thumb 5 Couple HalfDay 90.00
Tom Thumb 7 TwoAdults:3kids OneFullDay 210.00
Next I built a report based on that query. (Eventually the report will be a
sub-report, among several sub-reports that melded together will produce a
printed invoice, showing retreat fees, snack bar tabs, discounts, etc., but
right now I’m just trying to get it to work as a report on its own.)
I want to total the individual’s retreat fees, and show that total in the
invoice-report’s page footer, so I created another query (thinking this might
be the right way to do it) called qryRtreatFeesTotal, which used the
RetreatFee field from the first query with the function SUM on the Total line
of the QBE grid. Running the query produced the correct total for this
subset, of $615. The SQL it produced looks like this:
SELECT Sum(qryRetreatFees.RetreatFee) AS SumofRetreatFee FROM qryRetreatFees;
I then popped a text box onto the invoice-report’s page footer, and set its
control source to this:
=qryRetreatFeesTotal.SumofRetreatFee
It resulted in an #Error in the text box. And when I fire up the report
from scratch a pop-up ENTER PARAMETER VALUE window appears, asking for an
entry for qryRetreatFeesTotal.
What am I doing wrong?
the retreat fees recorded for one individual retreat participant from all
participants. Additionally it shows the pricing factors (family type,
duration of stay) that determine each fee. The query works accurately on my
test data, producing the following results:
Registrant FeeID RegistrantType Duration Fee
Tom Thumb 1 TwoAdults:2teens OneFullDay $315.00
Tom Thumb 5 Couple HalfDay 90.00
Tom Thumb 7 TwoAdults:3kids OneFullDay 210.00
Next I built a report based on that query. (Eventually the report will be a
sub-report, among several sub-reports that melded together will produce a
printed invoice, showing retreat fees, snack bar tabs, discounts, etc., but
right now I’m just trying to get it to work as a report on its own.)
I want to total the individual’s retreat fees, and show that total in the
invoice-report’s page footer, so I created another query (thinking this might
be the right way to do it) called qryRtreatFeesTotal, which used the
RetreatFee field from the first query with the function SUM on the Total line
of the QBE grid. Running the query produced the correct total for this
subset, of $615. The SQL it produced looks like this:
SELECT Sum(qryRetreatFees.RetreatFee) AS SumofRetreatFee FROM qryRetreatFees;
I then popped a text box onto the invoice-report’s page footer, and set its
control source to this:
=qryRetreatFeesTotal.SumofRetreatFee
It resulted in an #Error in the text box. And when I fire up the report
from scratch a pop-up ENTER PARAMETER VALUE window appears, asking for an
entry for qryRetreatFeesTotal.
What am I doing wrong?