Skip to content
Advertisement

Adding quotes into a sql query with Vba code

I can recover data from my database using vba, but I have to add quotes on the result of column (“value1”, “Value2”, “Value3″ etc) But I do not know how to add quotes inside the SQL query, when using ” it’s wrong the request. I am used to do this kind of concat in SQL but in VBA I am not able to do it. Thanks for your help.

Advertisement

Answer

When you use VBA, you need to double double-quote if you want to use it inside a string:

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement