created fields then used as criteria in another field in same quer

K

kate

I have a query in which I included a sum of two fields and called it "Total"
I then wish to take the field "Total" and and divide it by another field to
get a percentage. When I run the query it brings the created filed up like a
parameter what do i do to prevent this from happening???
 
R

Rick Brandt

kate said:
I have a query in which I included a sum of two fields and called it
"Total" I then wish to take the field "Total" and and divide it by
another field to get a percentage. When I run the query it brings the
created filed up like a parameter what do i do to prevent this from
happening???

You normally can't use the alias of a calculated field as if it were a "real"
field in other calculations of the same query. You have to repeat the first
calculation within the second one.

Instead of...

Percnt: [Total]/[SomeField]

....use...

Percnt: ([Field1] + [Field2])/[SomeField]
 
Top