Apostrophe in SQL Statement

  • Thread starter Thread starter VBStudent
  • Start date Start date
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?
 
Just use double quotes:

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

Users who are viewing this thread

Back
Top Bottom