Code for a Null value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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
 
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?
 
Back
Top