Code for a Null value

L

Lorraine

I have some code on a data entry form that looks like this....

Private Sub Issues_AfterUpdate()
If Me.[Issues].Value = "Other" Then
Me.[IssuesFound].Value = -1

End If
End Sub

If Issues is Null I want the value in IssuesFound to be "No" (this is a
checkbox). How do I code this?
 
D

Douglas J. Steele

Private Sub Issues_AfterUpdate()
If IsNull(Me.[Issues].Value) Then
Me.[IssuesFound].Value = 0
ElseIf Me.[Issues].Value = "Other" Then
Me.[IssuesFound].Value = -1
End If
End Sub
 
L

Lorraine

Thanks so much; this was very helpful. Now all I need is for an answer to my
"How to disable data entry fields" question (7 posts below this one). Do you
think you could give me an answer Doug?
 
Top