Invalid use of NULL (?!!)

mikewood1980

Registered User.
Local time
Today, 11:00
Joined
May 14, 2008
Messages
45
Hi

Can anyone help me with this - I keep getting an error on the line marked *** "Invalid use of NULL". The only way that the code can reach this line is if rsWallCons("intLeafID2").Value is NOT null - how is this possible?!!?

Code:
If rsWallCons("intLeafID2").Value = Null Then
                    MsgBox ("we dont have a wall")
                    intLeafID2 = 0
                Else
                    intLeafID2 = rsWallCons("intLeafID2").Value ***
                    
                End If
Can anyone help?

Thanks
Mike :confused:
 
Hm, try
Code:
intLeafID2 = nz(rsWallCons("intLeafID2").Value,0)
 
You cannot do... rsWallCons("intLeafID2").Value = Null

The proper If condition would be Isnull(rsWallCons("intLeafID2").Value)

Greets
 
You cannot do... rsWallCons("intLeafID2").Value = Null

The proper If condition would be Isnull(rsWallCons("intLeafID2").Value)

Greets


Thats great - thanks guys - I tried namliam's idea first and that worked!
 

Users who are viewing this thread

Back
Top Bottom