Getting a value from an unlreated query

deejay_totoro

Registered User.
Local time
Today, 08:47
Joined
May 29, 2003
Messages
169
Hello,

I have a report that calculates the total at the end of the report.

What I would like to do is:

take this calculated total and divide it by a number. The problem is that this number is a staff total and comes from another unrelated query (a different query source than that of the report.)

So, what I was wondering is: can I reference this single number from an unrelated query in my report?

for example, I was thinking of using the expression bulider, something like the following:

=(Sum([SumOfCostPerPerson]))/([MyQuery]![MyField])

But this doesnt work - just produces "#Error".

Thank you very much.

dj_T
 
I think you can get what you want by using a dlookup funciton to access the field from the unrelated query. The expressioin on your report would look something like the following:

=([SumOfCostPerPerson])/(dlookup("[MyField]","[MyTable]")

good luck!

GumbyD
 

Users who are viewing this thread

Back
Top Bottom