Form coding (Is Null) error

  • Thread starter Thread starter dbl
  • Start date Start date
D

dbl

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
 
How are we supposed to know what is stored in ed, strLookup, and crit?

To determine if a control has a null value, use something like:
If IsNull( Me.txtMyNiceDescriptiveName) Then
'do something
Else
'do something else
End If

You can also use the Nz() function.
 
Back
Top