By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,827 Members | 2,220 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,827 IT Pros & Developers. It's quick & easy.

Single Quote Frustration!

P: n/a
Hi

My Goal is This: " LAST = 'alliston' "

but the closest I can get is this: " LAST = "alliston" "
using the following code:
strWhere = (""" LAST = """ & Me.txtLAST & """ """)

How do I accomplish my goal and get the single quotes around the
name???

Also, any references for bringing sense to the use of quotes in
strings???

Thanks

Jan 14 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a

Ap******@gmail.com wrote:
Hi

My Goal is This: " LAST = 'alliston' "

but the closest I can get is this: " LAST = "alliston" "
using the following code:
strWhere = (""" LAST = """ & Me.txtLAST & """ """)

How do I accomplish my goal and get the single quotes around the
name???

Also, any references for bringing sense to the use of quotes in
strings???

Thanks
Const cSngQuote As String = " ' " 'remove the spaces... it's there so
you can see the single quote.

strWhere = "( LAST = " & cSngQuote & Me.txtLast & cSngQuote &")"

Jan 14 '07 #2

P: n/a
Ap******@gmail.com wrote:
strWhere = (""" LAST = """ & Me.txtLAST & """ """)
Why is this in parenthesis? They are not needed.
How do I accomplish my goal and get the single quotes around the
name???
Use single quotes

strWhere = """ LAST = '" & Me.txtLAST & "' """

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Be Careful, Big Bird!" - Ditto "TIM-MAY!!" - Me
Jan 15 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.