Skip to content
Advertisement

I’m trying to write a SQL statement in VBA to concatenate first and last name

I’m getting errors.

This is the original….

I’m exporting names to excel files and have several files, don’t want to make queries for each one, so would like to extract the data on open.

Here is my full code, corrected as below.

Advertisement

Answer

Double quotes delimit a String literal. To have double quotes inside a String literal you need to “escape” them; in VBA the way to do this is to double-up the double quotes:

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