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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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???
 
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]
 

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

Back
Top