I am creating a query that takes calculated values from a few other
queries and adds them together to then subtract from a total number. There
were three queries which calculated Non Business Days, Holidays, and Time
within a certain status. When I put these together the total came out
fine. However, I needed to add one that calcualted the time if the record
was currently in a certain status. I got the queries to work and give the
time for the certain records. However, when I try to add this to the query
that adds them all together it starts giving errors.
Basically what the query does is left joins some main info to the other
four queries that calculate the things mentioned above. There are then
some calculated fields that use IIF and check if there is a record for
that ticket number within the query. If there is it gives the value from
the other query otherwise it gives a 0. This works fine for three of the
queries but on the new one it does something wierd. For records that exist
in the new query it gives the correct number but instead of giving a 0 for
the others it says #Error. I can not figure out why it is doing this since
the query is setup exactly like the other ones and they give me no
problems. Does anyone know what can be causing this? Thanks for the help
and I hope this is clear enough.