Add a double quote character to a string
I need to build strings which include double quotes which will ultimately look like this:
How can I get the double quote to show up as part of the string and not as an operator?
Thanks in advance.
I need to build strings which include double quotes which will ultimately look like this:
How can I get the double quote to show up as part of the string and not as an operator?
Thanks in advance.
RE: Add a double quote character to a string
Hi wbayne333,
You can add virtually any "constant" to a text string...as long as the target application or database allows the constant.
The easiest way to add a constant to a text string is to use the concatenation operator (&) as in this simple example: Fields("SourceField1") & "constant"
Refer to the help topic entitled "Literal Values in Expressions" in the product documentation for details.
However, when the constant is a special character (anything except alpha and numeric characters or a space), you will need to use the Chr Function, as in this example:
Fields("SourceField1") & Chr(34)
...where Chr(34) will insert a quotation mark immediately after the data field value.
Refer to the Chr Function help topic for details about how to use that function AND for a link to a reference table of hex and decimal values.
- Jo