Query Calculations &

J

James

I have a query that includes two expressions(with calcs) named 'SC_amt' and
'Bal_due'
SC_amt: ([Balance]*[Serv_ch])
Bal_due: [Balance]*(1+[Serv_ch])

'Balance' is created in same query by:
Balance: [Amount]-[TotalPayments]

The query correctly calculates the expected values.

My question is, why am I getting "Enter Parameter Value" Prompts for Balance
and Serv_ch when I run this query?
Leaving the prompts blank, the results are perfect.

Any suggestions?
 
J

John Spencer

Often you need to repeat the initial calculation instead of using it
elsewhere - especially if you are sorting or filtering on the calculated
field.

Try

SC_amt: ([Amount]-[TotalPayments])*[Serv_ch]
Bal_due: ([Amount]-[TotalPayments])*(1+[Serv_ch])

If Serv_ch is a calculation, try replacing it with the calculation.


'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
J

James

I found the problem

The "Total:" for these two was set to Group By instead of Epression as are
the other named(declared) Expressions are, if thats correct.

I should have caught that. Thanks for your time.

John Spencer said:
Often you need to repeat the initial calculation instead of using it
elsewhere - especially if you are sorting or filtering on the calculated
field.

Try

SC_amt: ([Amount]-[TotalPayments])*[Serv_ch]
Bal_due: ([Amount]-[TotalPayments])*(1+[Serv_ch])

If Serv_ch is a calculation, try replacing it with the calculation.


'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================

I have a query that includes two expressions(with calcs) named 'SC_amt'
and 'Bal_due'
SC_amt: ([Balance]*[Serv_ch])
Bal_due: [Balance]*(1+[Serv_ch])

'Balance' is created in same query by:
Balance: [Amount]-[TotalPayments]

The query correctly calculates the expected values.

My question is, why am I getting "Enter Parameter Value" Prompts for
Balance and Serv_ch when I run this query?
Leaving the prompts blank, the results are perfect.

Any suggestions?
 

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