Quotation marks in VBA
This:
comboService = """ & Me.Combo8.Value & """
is what you posted, but you need to add an extra quotation mark in order to add a literal quotation mark:
comboService = """" & Me.Combo8.Value & """"
Double-quotes within a string are what you are looking for.
aVar = "This: "" is a literal quotation mark"
I took a page from MS (the old vbCRLF
) a while back, and just define any "tricky" characters I'll need as a string at the top of my code ...
Dim vbDblQuote As String
vbDblQuote = Chr(34)
Now you can just use that pseudo-constant as you build strings ...
strMyString = "Just another string " & vbDblQuote & "with quotes" & vbDblQuote & "!"
This makes code more readable, and also helps avoid "miscounted quote errors"