Calulated fields return #Error 1st time query is run

J

Joe

I have noticed that in some queries that have somewhat
complex calucated fields (especially ones with iif) the
calculated values show up as #Error the first time that I
open the query. If I close the query and open it again the
calucated field show the correct results. I believe that
this might have something to do with the queries having to
be occasionally recompiled. When I replace the inline SQL
calcuation with a VB function the #Errors don't appear but
it looks like the query takes much longer to execute. Any
recommendations.
 
M

[MVP] S. Clark

Any recommendations?
Don't use IIF() in your queries.

--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 

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

Top