Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

quotes in default value?

Status
Not open for further replies.

leobaby

Programmer
Mar 23, 2001
74
US
I have a check box that lets the user 'carry' information over to a new record by changing the default value with some lines of code like this.
Const cQ = """"
Me![Customer].DefaultValue = cQ & [Customer].Value & cQ
This doesnt work properly when the field has quotes in it, i get the usual #Name?.

Any suggestion helpful.
Matthew
 
A double quotes character is a system specific character that says Here IS or Here ENDS a string.

Two double quotes characters are taken by the system to mean "Here is a real DoubleQuotes. Treat it like a SINGLE text character.

So if you want a PAIR of Double Quotes to be treated as two text characters then you need to put:-
" "" "" "
" There comes a string
"" Treat me like a single double quotes
"" Treat me like a second single double quotes
" Here ends the string

( No specaes between them )



You can also achieve a similar thing using single quotes instead of the double quoes and hence the double quotes inside the string are treated literally from scratch:-
' " " '
' There comes a string
" I am a single double quotes
" I am a second single double quotes
' Here ends the string



G LS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top