Solved

Access 2000 need an alternative to NZ function

Posted on 2007-03-22
10
649 Views
Last Modified: 2013-11-27
I am using the NZ function in the fiels location.
Notes: NZ([purchaseorderdetail].[Notes],"")

I am having trouble importing this query into a 3rd party program. This program doesn't like this NZ function. When I take out the NZ function it imports perfectly. When I put the NZ function back into my query, the program doesn't want to connect. It says " Value cannot be null. Parameter name: adodb."

I need another way to do my NZ function without using it in the field location, so my 3rd party program will connect to my query.
Please let me know if you need more info or clarity.
Thanks
0
Comment
Question by:mancoi
  • 3
  • 2
  • 2
  • +2
10 Comments
 

Author Comment

by:mancoi
ID: 18773833
I posted a screen shot of the details section of my query.

http://download.yousendit.com/CDCE878C630B8DC5 

 
0
 
LVL 44

Assisted Solution

by:Arthur_Wood
Arthur_Wood earned 50 total points
ID: 18773842
try this in place of the NZ function:

Notes: [purchaseorderdetail].[Notes] & ""

this will append a "" (zero-length string) onto the values from the table, which will *not* affect notes that have real text, but will convert any NULL values to a zero-length string, which is precisely what your use of the NZ function is doing.


AW
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 18773862
try this

Notes: NZ([purchaseorderdetail].[Notes],Null)

Is the [Notes] field allow zero length property set to yes
0
 
LVL 38

Assisted Solution

by:Jim P.
Jim P. earned 50 total points
ID: 18773911
These are foreign tables in Paradox?  That you are connecting using ADO?

You'll have to dig around in the Paradox guide for that function. In Transact SQL (MS SQL version of SQL) the function is IsNull(MyField,'').
Oracle uses NVL(MyField,'').
0
 
LVL 65

Assisted Solution

by:Jim Horn
Jim Horn earned 100 total points
ID: 18773950
The below code is the VB equivalent of Nz, as VB does not have Nz.  Perhaps you can re-write it to be Paradox-friendly...
____
Public Function Nz(vValue as Variant, Optional vValueIfNull as Variant) as Variant

If Not IsNull(vValue)
   Nz = vValue
elseif IsNull(vValue) and (Not IsNull(vValueIfNull) then
   Nz = vValueIfNull
elseif IsNull(vValue) and IsNull(vValueIfNull)
  'User passed null values in both vValue and vValueIfNull.  Put what you want here, like...
   Nz = ""
end if

End Function
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:mancoi
ID: 18782346

Check this site out.....

How can I change my function to an IIF function? I am using ......Notes: NZ([purchaseorderdetail].[Notes],"")

http://tutorials.aspfaq.com/8000xxxxx-errors/can-i-use-the-nz-function-without-getting-80040e14-errors.html
0
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 300 total points
ID: 18782655
Notes:IIf(Len([purchaseorderdetail].[Notes])>0,[purchaseorderdetail].[Notes],"")
0
 

Author Comment

by:mancoi
ID: 18782677
Got it using an IIF I will award points....THANKS
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 18782852
Glad to be of assistance. May all your days get brighter and brighter.
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 18783720
glad to be of assistance.

AW
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

939 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now