Escape Quotations

kwatai

Registered User.
Local time
Today, 06:09
Joined
Jul 19, 2001
Messages
11
The subject says it all, how do I escape quotes in a quote. For example
msgbox "You entered "" & Name & "" as your input"
and it should come out
You entered "Jon" as your input

Its so easy in C but can't figure it out in VB. Also, how do you specify a new line?

thx
Kenta
 
Use the Chr() function to insert quotes, with the ascii number for the quote character.
"You entered " & Chr(34) & Name & Chr(34) & "as your input."

For a new line, Access wants a carriage return AND a line feed to create line breaks. Try
[First Field] & Chr(13) & Chr(10) & [Second Field] etc.
 

Users who are viewing this thread

Back
Top Bottom