casey
12-20-2000, 05:15 PM
How do you evaluate a null in a conditional? I'm using an if,then,else statement to evaluate the value returned from a DLookup function. If the function returns a null, I want to assign the value 0 to a variable. This is a simple example:
If varZ = Null Then
varY = 0
Else
varY = 1
However, when function does return a null, somehow the code evaluates a false condition and jumps to the else condition. I must be making a mistake somewhere referring to the "null".
If varZ = Null Then
varY = 0
Else
varY = 1
However, when function does return a null, somehow the code evaluates a false condition and jumps to the else condition. I must be making a mistake somewhere referring to the "null".