troubleshooting Question

Access to Excel Query Error

Avatar of Jon Bredensteiner
Jon BredensteinerFlag for United States of America asked on
Microsoft ExcelSQL
8 Comments1 Solution664 ViewsLast Modified:
Good morning all,
      I am trying to import data into Excel from an Access query.  When I try to add the query via the Microsoft Query manager in Excel, I receive the following error “Undefined function ‘NZ’ in expression”.  I know what is causing the error, but I don’t know why.
      I built the query in Access, and it joins multiple tables, and the problem was that one of the tables, which is being pulled from SQL Server via an ODBC hook, has the employees’ ID listed as text instead of a number, so when I joined the tables I used the below syntax to change the data from text to an integer; you can see my other posting relating to this at

My join statement:
 tbl_OrgMaster_2.BemsID = CLng(NZ(ENGPI_dbo_tbl_process_owner.Focal_Bems,0))

What’s weird is that I am not even trying to pull data directly from the query that contains the above join syntax “qry_DocumentMaster”, as I am pulling from another query “qryDIMaster” that pulls from the aforementioned query.

So, my question is, can I work around this, or will I have to do something like make an update table query, and then run it every time I want new data to be available in Excel?

Thanks in advance for your help, Jon
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 8 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros