troubleshooting Question

Access to Excel Query Error

Avatar of Jon Bredensteiner
Jon BredensteinerFlag for United States of America asked on
Microsoft ExcelSQL
8 Comments2 Solutions664 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

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 2 Answers and 8 Comments.
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>


Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 2 Answers and 8 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004