Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NZ function in Access 2002 not accepted by Excel

Status
Not open for further replies.

khwaja

Technical User
Aug 27, 2001
431
AU
I have qan Access uery which has a field based on a formula using NZ to report zeros when null. When I try to select this query using Import External data options in Excel(MS Query), I get the error message that 'too few parameters selected". However, when I remove the NZ from the expression in query, all is well. I find this quite weird as I need to use NZ in Access query. Is this a known issue? Any way to get around this?

Cheers

AK

Note: Using Access 97 - still.
 
Not being sure how you have constructed your query, try this instead of NZ:

Iif(IsNull(YourField),0,YourField)

When "YourField" is NULL, it takes the value 0, otherwise it stays the same value as it has.

hth
 
Nz is not a VBA function. It is an Access function, and therefore, is not recogonized by Excel, or any other Office application nor even VB.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Thanks CajunCenturion for the info.

AJN2004, to answer your queston, following is the expression i used:

TFE: NZ([FullHtAdded])+(NZ([MedHtAdded])*0.75)

I understand using your solution can possibly remove the need for having to use NZ but it is rather cumbersome as the expression will be unnecessarily lengthened.

Cheers

AK

Note: Using Access 97 for back end A2002 for front end.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top