Where you specify two single quotes ''
, one will escape the other and will result in single, try to replace it like this:
customerName = Replace(customerName, "'", "''")
More Related Contents:
- SQL Query output in VBA is different than in SQL Oracle
- How do I use parameters in VBA in the different contexts in Microsoft Access?
- What’s the difference between DoCmd.SetWarnings and CurrentDB.Execute
- Performing SQL queries on an Excel Table within a Workbook with VBA Macro
- Using Excel VBA to export data to MS Access table
- Accessing SQL Database in Excel-VBA
- Excel function to make SQL-like queries on worksheet data?
- Using Excel VBA to run SQL query
- How to use system username directly in MS Access query?
- Access – compare two tables and update or insert data in first table
- Query for getting value from another record in same table and filter by difference greater than a gap threshold
- How do I call an Oracle stored procedure from an Excel VBA script?
- How to save the result of a SQL query into a variable in VBA?
- Escaping ‘ in Access SQL
- How to Write SQL funtion
- Is it possible to insert multiple rows at a time in an SQLite database?
- What is SELF JOIN and when would you use it? [duplicate]
- Spark Window Functions – rangeBetween dates
- “CASE” statement within “WHERE” clause in SQL Server 2008
- SQL Server – How to lock a table until a stored procedure finishes
- How to create a unique index on a NULL column?
- Serial numbers per group of rows for compound key
- Difference between datetime and timestamp in sqlserver? [duplicate]
- How to count instances of character in SQL Column
- Meaning of square brackets [] in MS-SQL table designer? [duplicate]
- Check if current date is between two dates Oracle SQL
- convert Postgres geometry format to WKT
- SQL query that gives distinct results that match multiple columns
- SQL Server Convert integer to binary string
- create custom function for date difference excluding weekends and holidays in oracle sql