Query asking for a parameter where none needed?

LomaxE

New member
Local time
Today, 11:19
Joined
Jul 1, 2010
Messages
8
Hi,
I have a macro set to run over night that runs a hundred or so queries in a row. I've just added a few which now cause the macro to pause and ask for parameter values - only none are needed.

The parameter box asks for a value for "total".

In the query itself I have a column - total: dist_no (where dist_no is a column in my table). The queries is grouped and this column is set to count.

Then in a later column I have : Target Amber: ([Total]+(([Total]/100)*5))

Which I think might be what is causing the parameter box to pop up. Is there a way around this?
 
It appears that the query is not recognising the Total field as in the unlerlying query it is being derived in the way of a calculation. What you may need to do is to replicate the Total field as per the referenced query.

Query1

Total:[A]*

Query2

AmberTotal : (([A]*)+(([A]*)/100)*5))

Just a thought
 
Hi David,

I had thought of that and tried a few combinations of count(Dist_no), countofDist_no, countof([Dist_no]) etc to use in the calculation but I can't seem to get the syntax right. Any suggestions of the syntax?

I suppose another option would be to have an earlier query doing the grouping/counting and then a second one doing the calculations so it recognises the field names but I was hoping there would be a away around it.
 

Users who are viewing this thread

Back
Top Bottom