RE: Code error is null
- From: Klatuu <Klatuu@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 28 Jun 2005 06:58:04 -0700
I have not tested this, but I think it will do the trick. I return 99 in the
Nz() function so that a Null value will translate to a value larger than you
are checking for.
ed = DLookup(strLookup, "qryCheckRecSent", crit)
If Nz(Me.Text503,99) < 1 And Me.ExAge >= 25 Then
ed = ed + DLookup("[Novice25Plus]", "qryCheckRecSent", crit)
End If
"dbl" wrote:
> Hi I have the following code which I need to work out how to tell it if
> Text503 is null then to ignore this part of the code
>
> If Me.ExAge >= 25 And Me.Text503 <1 Then
> ed = ed + DLookup("[Novice25Plus]", "qryCheckRecSent", crit)
> End If
>
> I have tried different ways but all produce the following error Compile
> Error Expected Expression
> this is what I have done, how do I put it right?
>
> ed = DLookup(strLookup, "qryCheckRecSent", crit)
> If Me.ExAge >= 25 And Me.Text503 Is Not Null And <1 Then
> ed = ed + DLookup("[Novice25Plus]", "qryCheckRecSent", crit)
> End If
>
> Any help would be very much appreciated.
>
> Bob
>
>
>
.
- Follow-Ups:
- Re: Code error is null
- From: dbl
- Re: Code error is null
- References:
- Code error is null
- From: dbl
- Code error is null
- Prev by Date: Re: Read Only - DB
- Next by Date: After Update not working quite correct
- Previous by thread: Code error is null
- Next by thread: Re: Code error is null
- Index(es):
Relevant Pages
|