473,320 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

ADO Recordset: Undefined Function 'NZ' in expression

Hi,
I'm running an ADO Recorset from Excel to gather data from Access.
Basically it's copying the records of a query -that runs without
problem in Access-

That query has an expression with NZ() function. Used to sum two
separate fields because I found that if there is a null field an
addition operation is not performed.

When running the ADO Recorset, I get the following message:

Run-time error '-2147217900 (80010e14)':
Undefined function 'NZ'in expression.

I have already tested the ADO connection with other Access query and
works fine.

Any hint on how to solve this issue?

Regards,
LC

Nov 13 '05 #1
3 17020
Br
ca******@yahoo.com wrote:
Hi,
I'm running an ADO Recorset from Excel to gather data from Access.
Basically it's copying the records of a query -that runs without
problem in Access-

That query has an expression with NZ() function. Used to sum two
separate fields because I found that if there is a null field an
addition operation is not performed.

When running the ADO Recorset, I get the following message:

Run-time error '-2147217900 (80010e14)':
Undefined function 'NZ'in expression.

I have already tested the ADO connection with other Access query and
works fine.

Any hint on how to solve this issue?

Regards,
LC


The Nz() function is specific to the Access code library. If you wish to
use it you would need to reference the Access library... but I'd replace
it with something else personally.
--
regards,

Bradley

A Christian Response
http://www.pastornet.net.au/response
Nov 13 '05 #2
LC

The NZ function is (I think) a method of the application object and not a VBA
function. You could try to replace it with your own version of the function or
use:

Iif(IsNull([Data], "",[Data])

in your query.

Let me know what happens...

Regards

Nigel
On 11 Aug 2005 17:24:16 -0700, ca******@yahoo.com wrote:
Hi,
I'm running an ADO Recorset from Excel to gather data from Access.
Basically it's copying the records of a query -that runs without
problem in Access-

That query has an expression with NZ() function. Used to sum two
separate fields because I found that if there is a null field an
addition operation is not performed.

When running the ADO Recorset, I get the following message:

Run-time error '-2147217900 (80010e14)':
Undefined function 'NZ'in expression.

I have already tested the ADO connection with other Access query and
works fine.

Any hint on how to solve this issue?

Regards,
LC


Nov 13 '05 #3
Thnks Nigel,

Effectively there seems to be a problem when accessing NZ function out
of MSAccess environment.

It worked changing NZ() function with conditionals to test for NULL
values.

Regards
LC

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dalan | last post by:
I seemed to be having problems with structuring the use of NZ with a DSum expression. Having tried numerous variations of the expression without success, I'm asking for assistance. First some...
9
by: Dom Boyce | last post by:
Hi First up, I am using MS Access 2002. I have a database which records analyst rating changes for a list of companies on a daily basis. Unfortunately, the database has been set up (by my...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
4
by: MX1 | last post by:
Help. I have a complex Access database that I've tied into using ASP. Things work great, except I can't seem to have queries that originate in ASP use the NZ function. Need it in case there are...
9
by: JC | last post by:
The following function creates a display name from a and and . I call the function from a query. When I run the query those records that have BOTH a his and her name appear correctly, but if...
8
by: Joona I Palaste | last post by:
We all know that this: void *p; if (p=malloc(1)) { free(p); p; } causes undefined behaviour if malloc() succeeds. But what about this?
1
by: LoopyNZ | last post by:
Hi there, I have an IIF expression that is returning a 0 (exact match), 1 (partial match), or 2 (no match) based on comparing text fields (see below). However, when I try to sort the results...
5
by: adinda | last post by:
So what i need is this; (I'm very new at this,, programming in C I mean...) In matlab I had a while loop, and after each loop was done I added my resulting matrix to an object. Seeing the loop...
33
by: coolguyaroundyou | last post by:
Will the following statement invoke undefined behavior : a^=b,b^=a,a^=b ; given that a and b are of int-type ?? Be cautious, I have not written a^=b^=a^=b ; which, of course, is undefined....
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.