Apostrophe in SQL Statement (1 Viewer)

V

VBStudent

Guest
I am designing a datbase using Access 97. I am wrting code to make it more user friendly. I have a search facility which works by using an SQL statement to retrieve names from the Database, however I cannot serach for any name with an apostrophe. Can anyone help?
 

cpod

Registered User.
Local time
Today, 15:12
Joined
Nov 7, 2001
Messages
107
Just use double quotes:

"SELECT [table 1].* FROM [table 1] WHERE [table 1].textfield=""" & strText & """;"
 

Users who are viewing this thread

Top Bottom