469,934 Members | 1,619 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,934 developers. It's quick & easy.

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 16686
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Dalan | last post: by
9 posts views Thread by Dom Boyce | last post: by
9 posts views Thread by JC | last post: by
8 posts views Thread by Joona I Palaste | last post: by
33 posts views Thread by coolguyaroundyou | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.