Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

NULL database fields.... so annoying!

Posted on 2002-04-18
2
129 Views
Last Modified: 2010-05-02
mystring = IIf(rsStud("L1 to OCN") is null , "", rsStud("L1 to OCN"))
*------------
mystring = IIf(rsStud("L1 to OCN") = null , "", rsStud("L1 to OCN"))
*------------
mystring = IIf(rsStud("L1 to OCN") = VbNullString , "", rsStud("L1 to OCN"))
*------------

(rsStud("L1 to OCN") is a text field in an Access2k DB)

all these methods return an error how can i perform this operation?

0
Comment
Question by:djdidge
2 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 50 total points
ID: 6950846
simply use this :
mystring = rsStud("L1 to OCN") & ""
0
 
LVL 2

Author Comment

by:djdidge
ID: 6950875
i can see how that works, by converting the null value into an empty string.

That is a bit rubbish on microsoft's part.

anyway thanks emoreau.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…

840 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