WalkieTalkie
Technical User
I always have trouble with concatentaing strings and text and can never work out whether and/or when to use a single or double apostrophe!!! I know this is simple but I just can't get it right...
txtInstructions is a textbox on a form in a MS Access 2003 database.
I am trying to change the control source for the the text box using the following code:
I am getting a syntax error. I have isolated it down to a problem with the syntax around strNewClient but despite having tried what must be every variation of combinations of single and double apostrophes I just can't get it to work.
I will be grateful for any help offered!
txtInstructions is a textbox on a form in a MS Access 2003 database.
I am trying to change the control source for the the text box using the following code:
Code:
Dim strNewClient As String
strNewClient = Me.txtNewClient
[Forms]![frmCompanionWizard]![txtInstructions].ControlSource = "= '" & strNewClient & "' is now a member of '& txtOldClient &'`s travelling party.'"
I will be grateful for any help offered!