trying to use null but getting no where
- From: sparks <sparks@xxxxxxxxxxx>
- Date: Fri, 21 Mar 2008 15:44:00 GMT
in access 203 I am passsing some variables to a fuction and then
calculating on them and passing off this to another function.
my problem comes with the nulls
I am passing some values and strings to different functions
one problem I need to define a vaiable as int
dim res as integer
but when I do this
If Not IsNull(Me.Controls(str4).Value) Then
res = Me.Controls(str4).Value
Else
IsNull (res)
End If
if the control is null then res should be null
but res = 0
the only thing I can find is that res should be a variant
then I run into a problem that passing to the next function
If Not IsNull(ageck) And Not IsNull(wt) And Not IsNull(res) And Not
IsNull(pos) Then ' And Not IsNull(val2) Then
ckstuff2 ageck, wt, res, pos, val2
it looks as res and sure enough res (a variant) = 0
should I do something like this on the variable to define a null to a
99 so I can then look at it or what I am not sure what to do and don't
want to start replacing values.
iif(isnull(res),99,res)
.
- Follow-Ups:
- Re: trying to use null but getting no where
- From: Tom van Stiphout
- Re: trying to use null but getting no where
- Prev by Date: Re: Help with Error 3420 when Moving to Next Record after a Requery
- Next by Date: Displaying and Saving image to an automated filename
- Previous by thread: Digitally sign Access 2007 .accda Add-In
- Next by thread: Re: trying to use null but getting no where
- Index(es):
Relevant Pages
|