Stupid Me or Stupid VBA One or the other...

ReAn

Dangerous Programmer...
Local time
Today, 14:34
Joined
Jun 25, 2004
Messages
250
Can someone tell me why when i break on this line, it reports rst("MechHours") is 800

Code:
If rst("MechHours") <> Null Then

But branches to the else block?
 
If not IsNull(rst("MechHours")) Then

???
 
Id still like to know why you cannot use the <> (does not equal) operator.
 
I think it's just a matter of semantics' blurring your logic thinking - Does sound like it should work when you read it though :)
 
A Null is not a value so comparing something to it is meanigless, returns a null, and will never evaluate to True.
Exercise: Debug.Print IsNull(10<>Null)
 
Well, VB/VBA... unlike any other major language (aka C/C++/Java) apparantly dosent have null as a value.

IsNull() func it makes me think that it may be a flag or something.

Because in C++/Java Null has a value and object == null will return true or false.
 
A's no-value value has no value.
to assign a value to the no-value value seems to be a contradiction??

izy
 

Users who are viewing this thread

Back
Top Bottom