Query based on another Query?

NewShoes

Registered User.
Local time
Today, 05:17
Joined
Aug 1, 2009
Messages
223
Hey all,

I have a query that has a calculated field (Number of Employees). This uses a simple IIF to calculate the number of employees and works fine.

I have a second query that uses the first query. In this query I use the calculated field to 'Sum' the number of employees grouped by the field 'Building'.

In the second query I find that the Sum figure is wrong! However, if I create a new field within the query (i.e. Num Of Employees: [Number of Employees]) it works!

This is fine but I was wondering if anyone could shed any light on why it works this way?

Thanks,
-NS
 
Please post the sql underlying the queries.

I see you have made 141 posts, so I'm sure people have advised you against putting spaces or special characters in your field names.
 
As jdraw said, it is difficult without seeing the actual query.

Using the IIF statement to count the number of Employees seems very strange to me. I would expect a Count statement...
 

Users who are viewing this thread

Back
Top Bottom