Solved

Empty values

Posted on 2000-03-30
2
181 Views
Last Modified: 2010-05-02
I have an access database that has a field that could have nothing in it. (Blank). I am trying to set up a loop that will test to see if the value is blank. i.e.
Do While Not RecSetWip.EOF
        If (RecSetWip("WIP-Count").Value = Empty) Then
            WIPCount = WIPCount + 1
        Else
            WIP = WIP + RecSetWip("WIP-Count").Value
            WIPCount = WIPCount + 1
        End If
        RecSetWip.MoveNext
    Loop

I have tried NULL, Empty, "", but everything sets off the "Run time error 94, invalid use of NULL". How can I check to see if the value is a empty (blank) value?
0
Comment
Question by:buyer
2 Comments
 
LVL 6

Accepted Solution

by:
Marine earned 200 total points
ID: 2670670
Try using something like this.

Do While Not RecSetWip.EOF
If isNull((RecSetWip("WIP-Count")) Then
            WIPCount = WIPCount + 1
        Else
            WIP = WIP + RecSetWip("WIP-Count").Value
            WIPCount = WIPCount + 1
        End If
        RecSetWip.MoveNext
    Loop
0
 

Author Comment

by:buyer
ID: 2670696
Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Best way to parse out a json string in VB6? 10 277
Adding to a VBA? 6 82
How does CurrentUser work? 10 41
Remove Exif Orientation before adding image to db 9 38
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

685 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