Results 1 to 6 of 6
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Query Text (Access 2000)

    Hi

    Is there any way to do a query on certain text in a text box. for instance if a a text box contains Pizza Hut Bourneth plus lots of other text, and I want to query all records that contain Pizza Hut is this possible.

    Many thanks

    Braddy
    If you are a fool at forty, you will always be a fool

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Query Text (Access 2000)

    I'm not sure I understand what you mean. Perhaps set the criteria for the field containing the text to<pre>Like "*Pizza Hut*"</pre>

    If that is not what you want, please try to explain again.

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Query Text (Access 2000)

    Hi Hans

    That worked just fine Thanks very much

    Braddy
    If you are a fool at forty, you will always be a fool

  4. #4
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Query Text (Access 2000)

    Hi Hans

    I apologize if I am not doing this request properly, It's just that I had another thought rather than doing a different query for any text I want to find, is it possible to use the like parameter to find and text that I need for example Like [Enter the text you need to find]

    Thanks

    Braddy
    If you are a fool at forty, you will always be a fool

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Query Text (Access 2000)

    You can use<pre>Like "*" & [Enter the text you need to find] & "*"</pre>

    or, you could create a form, say frmSearch with a text box txtFindText, and refer to that:<pre>Like "*" & [Forms]![frmSearch]![txtFindText] & "*"</pre>

    The latter will only work correctly if the form is open.

  6. #6
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Query Text (Access 2000)

    Hi Hans

    Your first option works fine for me.

    Once again I am grateful for your help.

    Braddy
    If you are a fool at forty, you will always be a fool

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •