A family of Microsoft relational database management systems designed for ease of use.
PS: I perhaps should have explained how you'd apply the above when building a search criterion in code. While the expressions as above would be fine in SQL, in code, because the expressions contain double quotes characters which represent literal quotes characters you have to double up on them again when building a string expression for the criterion. Using your example again, if we assume the following simple table:
MyID MyField
1 Find'Me"here
2 Find"Me'here
a simple little function to find the row with the Find"Me'here value, assuming that the single and double quotes are treated as separate characters would be like this:
Function FindFirstTest()
Dim rst As DAO.Recordset
Dim strSearchString As String
Dim strCriteria As String
strSearchString = "Find""Me'here"
strCriteria = "Replace(MyField,"""""""",""~"") = """ & Replace(strSearchString, """", "~") & """"
Set rst = CurrentDb.OpenRecordset("SELECT * FROM MyTable")
With rst
.FindFirst strCriteria
Debug.Print .Fields("MyID")
End With
End Function
This would return 2 in the 'immediate' window.
If we change the code to treat single and double quotes as de facto the same character:
Function FindFirstTest()
Dim rst As DAO.Recordset
Dim strSearchString As String
Dim strCriteria As String
strSearchString = "Find""Me'here"
strCriteria = "Replace(MyField,"""""""",""'"") = """ & Replace(strSearchString, """", "'") & """"
Set rst = CurrentDb.OpenRecordset("SELECT * FROM MyTable")
With rst
.FindFirst strCriteria
Debug.Print .Fields("MyID")
End With
End Function
It now returns 1.