|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > Working with Nulls in In....Then loops |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|