Invalid use of NULL (?!!) (1 Viewer)

mikewood1980

Registered User.
Local time
Today, 01:25
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:
 

ErikSnoek

Programmer
Local time
Yesterday, 17:25
Joined
Apr 26, 2007
Messages
100
Hm, try
Code:
intLeafID2 = nz(rsWallCons("intLeafID2").Value,0)
 

namliam

The Mailman - AWF VIP
Local time
Today, 02:25
Joined
Aug 11, 2003
Messages
11,695
You cannot do... rsWallCons("intLeafID2").Value = Null

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

Greets
 

mikewood1980

Registered User.
Local time
Today, 01:25
Joined
May 14, 2008
Messages
45
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

Top Bottom