Building Criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This question was in a series on replies on a thread few days ago. so I
re-post it alone.

Is there a way to write a criteria and never worry about the ' or " or other
special characters?
I'm assuming that sometimes I have to compare Strings.

like in
stLinkCriteria = "[FieldName]='" & MyVar & "'"
DoCmd.OpenForm FormName, , , stLinkCriteria

where MyVar can include '," etc..

Thank you
 
Thank you very much. great link.
--
------------
G.Haddad
------------


Douglas J. Steele said:
I outlined one approach in my May 2004 "Access Answers" column in Pinnacle
Publication's "Smart Access". You can download a copy of that column, along
with the accompanying sample database, for free at
http://www.accessmvp.com/djsteele/SmartAccess.html

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



jouj said:
This question was in a series on replies on a thread few days ago. so I
re-post it alone.

Is there a way to write a criteria and never worry about the ' or " or
other
special characters?
I'm assuming that sometimes I have to compare Strings.

like in
stLinkCriteria = "[FieldName]='" & MyVar & "'"
DoCmd.OpenForm FormName, , , stLinkCriteria

where MyVar can include '," etc..

Thank you
 
Back
Top