 <p>...better is declare the name as varible ,and ask before if thereis a apostrophe in the string:</p> <p>e.g.:</p> <p>DIM YourName string</p> <p>YourName = "Daniel O'Neal"</p> <pre><code> If InStr(YourName, "'") Then SELECT * FROM tblStudents WHERE [name] Like """ Your Name """ ; else SELECT * FROM tblStudents WHERE [name] Like '" Your Name "' ; endif </code></pre>