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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What Good are Null Values

Status
Not open for further replies.

InyoTom

Technical User
Feb 4, 2000
33
US
My code is littered with IsNull and Nz, defenses against the Dreaded Null Value. So far I have not discovered a good use for null values. Perhaps I am missing something. Anyone out there know any beneficial uses?
Tom Budlong
TomBudlong@Bigfoot.com

 
Hiya Tom,

There are many beneficial uses of the NULL value, especially in fields such as date fields where an event has not yet happened. The alternative to doing this would be to have somekind of default value that means nothing has happened, not always very easy, and as you can see from the code, ISNULL is a very simple way to find these values.

If you used a default value, you would then have much more complex code trying to find these values and determine if they were real values or just there to get rid of a NULL.

Tim
 
I find Null especially useful in checking conditions based on multiple dates, it saves me mucho code.

Switch([FirstDatetoCheck],firstString,[SecondDatetoCheck],secondString,True,"There is no date for this event")

(hopefully someone will tell me if this is a dangerous programming practice in Access97!)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top