Solved

Empty values

Posted on 2000-03-30
2
177 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
Comment Utility
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
Comment Utility
Thanks
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

771 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

12 Experts available now in Live!

Get 1:1 Help Now