A literal value in a SQL statement needs delimiters.
Number fields don't use anything as the delimiter.
Text fields use quote marks as delimiters.
Dates use # as the delimiter.
The problem with text fields is that you also need quotes around the whole
string, so you now have quotes inside quotes. To let VBA know it's not the
end of the string (which is how it interprets a quote), you have to double
the quotes up.
Example: To produce the string:
This string has a "word" in quotes
You code:
"This string has a ""word"" in quotes"
If you close the quotes straight after the literal quotes, you end up with 3
in a row, i.e.:
"This string has a word in ""quotes"""
From there, you can probably make sense of the example in the previous post.
It is possible to use a single-quote as the delimiter inside the quotes, but
this fails if the string contains an apostrophe, e.g. O'Brien, can't. The
double-quote inside quotes is far less common: you rarely see it other than
for inches or seconds.