trying to use null but getting no where



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)

.



Relevant Pages

  • Re: trying to use null but getting no where
    ... Dim v As Variant ... not " IsNull (res) " ... Msgbox "It's Null!" ... calculating on them and passing off this to another function. ...
    (comp.databases.ms-access)
  • Re: [PHP] passing return value from fucntion
    ... I think there must be a caller and a callee when we ... talking about "passing arguments". ... $res = notok; ... words "ok" and "notok" wont have any effective meaning. ...
    (php.general)
  • Re: Passing Score for 70-215 Exam
    ... I'd just like to know what a passing ... >> RES ... beta questions, the passing score is a useless number. ...
    (microsoft.public.cert.exam.mcsa)
  • Re: Parameters in events
    ... > Private Sub object_ProjectBeforeResourceChange2(ByVal res As ... > MSProject.Resource, ByVal Field As PjField, ByVal NewVal As Variant, ByVal ...
    (microsoft.public.project.vba)
  • Re: Vlookup syntax format
    ... Dim myDate As Date ... Dim res As Variant ... What I read was that Microsoft wasn't putting VBA with the latest Mac ...
    (microsoft.public.excel.programming)