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
Color Control on a form in Access 2003
binding items collection of several comboBoxes to the Values in a specified column of the table
SBS 2008 Remote Web Workspace getting 10009 and continously prompting users for password, not letting them into there PCs
Isass.exe error
How to determine Windows Version installed on a non-booting hard drive
Setting references in a new Access 2003 database using VBA
vb.net check isIde
Excel paysheet
Delete with INNER JOINS
event viewer log error 17055 mssqlserver backup logs