Like query - using a string value from a form

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • gus

    #1

    Like query - using a string value from a form

    I am trying to query large text fields searching for text strings. I
    can do this successfully in query design by entering the criteria
    Like "*my text*"

    I want to do it by entering the text in a form field which on update
    will requery a subform displaying the relevant records.

    I can do all of that for similar exact matches without any problem.

    While I can navigate (slowly) aroung embedded literals I am having
    trouble getting this query to work and I am beginning to wonder if
    access is adding something to the information on the way to the SQL.
  • Fredg

    #2
    Re: Like query - using a string value from a form

    gus,
    Change the query criteria from
    Like "*MyText*"
    to:
    Like "*" & forms!NameOfFor m!NameOfControl OnForm & "*"


    --
    Fred

    Please reply only to this newsgroup.
    I do not reply to personal e-mail.


    "gus" <gus@opr.com.au > wrote in message
    news:ccc38b79.0 309101738.312dd e22@posting.goo gle.com...[color=blue]
    > I am trying to query large text fields searching for text strings. I
    > can do this successfully in query design by entering the criteria
    > Like "*my text*"
    >
    > I want to do it by entering the text in a form field which on update
    > will requery a subform displaying the relevant records.
    >
    > I can do all of that for similar exact matches without any problem.
    >
    > While I can navigate (slowly) aroung embedded literals I am having
    > trouble getting this query to work and I am beginning to wonder if
    > access is adding something to the information on the way to the SQL.[/color]


    Comment

    • gus kernot

      #3
      Re: Like query - using a string value from a form


      I just knew it was going to be an irritatingly simple version of
      something slightly different from all the other things I had already
      tried.

      Thanks mate



      *** Sent via Developersdex http://www.developersdex.com ***
      Don't just participate in USENET...get rewarded for it!

      Comment

      Working...