I have created a search field on a form that refers to a query. It searches by Organization Name. Some organizations have an apostrophe in the name, and that caused an error No. 3077. This was remedied with the following code:

Code:
Public Function fHandleApostrophe(strPass As String) As String
    Dim strRet As String
  
    strRet = strPass
    If InStr(1, strRet, "'", vbTextCompare) > 0 Then
...