Microsoft
Software
Hardware
Network
Question : How to write SQL with string containing an apostrophe
This statment works fine until the 'SelectedCompany' contains an apostrophe
SQLstatement = "SELECT * " _
& "FROM tbContactsNonClients " _
& "WHERE Company = '" & SelectedCompany & "';"
How do I accomodate a string with an apostrophe since I'm using the 'single quotes' to avoid conflict among the "double quotes"?
Answer : How to write SQL with string containing an apostrophe
you can do this
SQLstatement = "SELECT * " _
& "FROM tbContactsNonClients " _
& "WHERE Company = " & chr(34) & SelectedCompany & chr(34)
Random Solutions
Can't change link source from one workbook to its apparently identical twin.
view table relationships graphically sql server 2000
OWA 2007 External Access
How to terminate a processes in MS SQL Server
popup modal form
Print setup in Excel 2007
Apache .NET vs IIS 6.0\7.0
Access 2007 - Flush Fields
C#: Class Library
INSERT INTO new table from existing stored procedure