In my current VBA code, I have a query in which I am using Chr(34)
to put quotation marks between some of my variables.
I was wondering what alternatives exist to this. This is a simple question, i know, but I haven't had any success with repeating quotation marks like this
"
& variable string here &"
My code is messy for one and not understandable for people who are not familiar with VBA:
comboService = Chr(34) & Me.Combo8.Value & Chr(34)
Also, this hasn't worked:
comboService = """" & Me.Combo8.Value & """"
Can you perhaps tell me why?
Thanks in advance.
"""" & Me.Combo8.Value & """"
works in VBA. What error or problem are you getting?comboService
in a Query.MsgBox """" & strIn & """"
is fine. If quote marks prove difficult then the quick workaround is to use the macro recorder to record the string you need in a formula