I get an error in my app when a user enters an apostrophe in text box during data entry, I use an before update event to check for duplicates and thats when the error is triggered.
Here is the code for the before update event
The text box is bound. How can I get around this issue?
Thanks in advance!
Here is the code for the before update event
Code:
If DCount("*", "tblAccount", "[accSchoolName]='" & Me.accSchoolName & "' And [accSystemType]='" & Me.cboSystemType & "'") > 0 Then
Beep
Me.lblMessage.Caption = "School and system type combination already exist, please enter an new school name or select a different system type to continue. "
Cancel = True
Me!cboSystemType.Undo
Else
Me.lblMessage.Caption = ""
End If
The text box is bound. How can I get around this issue?
Thanks in advance!