Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old June 11th, 2005, 05:41 PM
BillByars BillByars is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 2 BillByars User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 28 m
Reputation Power: 0
Question Working with Nulls in In....Then loops

Does anyone know how to deal with tests that result in a Null in an If...Then loop?

I'm testing two variants. One is looking at a column in a table that is a date. Any equality test ends in a Null if the date field is empty. This is normal.

But my If...Then loop doesn't detect the fact that it is Null. It fails the test and jumps the the end if statement.

For instance, if I say, "If var1 <> var2 then" and var2 is a null then the test is a null and the If...Then takes this as not true, meaning the same as though var1 and var2 are equal. I even trough in a "or var2 = Null" and that doesn't work either.

In othe words, it looks like a Null answer to a comparison test in an If...Then loop breaks the loop. But there must be a way to do this.

Help?

- Bill

Reply With Quote
  #2  
Old June 11th, 2005, 05:50 PM
BillByars BillByars is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 2 BillByars User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 28 m
Reputation Power: 0
Exclamation Good Grief...

Sorry, never mind.

I worked on this for well over an hour, gave up and searched the web for a while, found this site, entered the question this is linked to, and then 30 seconds later found the IsNull() function which works just fine.

I'm an idiot.

Sorry....

- Bill

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Working with Nulls in In....Then loops


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT