Parameter Problem

W

William R. Hess

I have a summary query that is summing the daily% [Sum of Daily%] and
summing the hours [Sum of Hours]. When I run the query with these two
columns, it runs fine and shows the values. I add a third column which is
calculted as Rate%: [Sum of Daily%]/[Sum of Hours]. When I run the query,
it is asking for values for [Sum of Daily%] and [Sum of Hours]. I doesn't
matter what number (if any) I enter, I can just press return, and they run
fine. How can I stop Access from asking for these parameters?

Thanks for any suggestions!

-Bill
 
L

lesley

Please can you put me out of my misery. I cannot seem to find Table Tools.
The toolbar that appears over the Word page, enabling me to merge cells etc.
It is so elusive. Thanks.
 
A

Allen Browne

I think you are talking about a Totals query, so under your:
[Daily%]
field you have Sum in the Total row?

If so, what do you have under this calculated field?
Try Expression (i.e. not Group By.)

If that doesn't solve it, look very carefully at the names over the columns
in the query results. Do they contains spaces? The percent sign? Try using
exactly those names in your expression. Or alias the names by typing a new
name and column in front of the column, e.g.:
DailyTotal: [Daily%]
and then use DailyTotal in your expression.

If that doesn't solve it either, switch to SQL View (View menu), and repeat
the actual expression instead of the alias. Something like:
Sum([Daily%]) / Sum([Hours])
 
L

lesley

Please can you tell me how to bring up the Table Tools, to merge cells etc.
I found it once, but never again!!Thanks
 
W

William R. Hess

That's what it was! Change from Group By to Expression got rid of it.

Thanks again Allen!

-Bill


Allen Browne said:
I think you are talking about a Totals query, so under your:
[Daily%]
field you have Sum in the Total row?

If so, what do you have under this calculated field?
Try Expression (i.e. not Group By.)

If that doesn't solve it, look very carefully at the names over the
columns in the query results. Do they contains spaces? The percent sign?
Try using exactly those names in your expression. Or alias the names by
typing a new name and column in front of the column, e.g.:
DailyTotal: [Daily%]
and then use DailyTotal in your expression.

If that doesn't solve it either, switch to SQL View (View menu), and
repeat the actual expression instead of the alias. Something like:
Sum([Daily%]) / Sum([Hours])

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

William R. Hess said:
I have a summary query that is summing the daily% [Sum of Daily%] and
summing the hours [Sum of Hours]. When I run the query with these two
columns, it runs fine and shows the values. I add a third column which
is calculted as Rate%: [Sum of Daily%]/[Sum of Hours]. When I run the
query, it is asking for values for [Sum of Daily%] and [Sum of Hours]. I
doesn't matter what number (if any) I enter, I can just press return, and
they run fine. How can I stop Access from asking for these parameters?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top