Hello all:
I have a form with a textbox. In this text box I would like to search text that has been typed in the box for a specific word, and if this phrase has been found, I would like specific checkboxes to be checked. A sample of my code for this is below:
Private Sub Notes_AfterUpdate()
If InStr(0, Me.Notes.Text, "contact") > 0 Then
Me.chkFollowUp = True
End If
End Sub
However, when I update the textbox I get an error on the If line.
Can anybody help me spot what is wrong with my code?
Thanks!
I have a form with a textbox. In this text box I would like to search text that has been typed in the box for a specific word, and if this phrase has been found, I would like specific checkboxes to be checked. A sample of my code for this is below:
Private Sub Notes_AfterUpdate()
If InStr(0, Me.Notes.Text, "contact") > 0 Then
Me.chkFollowUp = True
End If
End Sub
However, when I update the textbox I get an error on the If line.
Can anybody help me spot what is wrong with my code?

Thanks!