I need to include glitches within a query string, but keep getting an "unterminated string" error. How would I modify the below to accept glitches within the Name field?
Set conn = CreateObject("ADODB.Connection")
MyName = "O'Brien"
MySql = "SELECT * FROM MyTable WHERE Name = '" & MyName & "'"
Set rs = conn.Execute(MySql)
If Not rs.EOF Then MsgBox("Found Name!")