Results 1 to 2 of 2
  1. #1
    Lounger
    Join Date
    Apr 2005
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query; User Criteria (Access 2000)

    I need to be able to run a query on my table that collects a variety of data on building permits. Each record has a type of construction or structure description.
    I have query that when run, prompts a user to "Enter Description". Upon entering the description of a structure, the user clicks "OK" and the query returns all of the records that have that structure description.
    So far so good. The problem is that I want the query to pull all of the records with similar description types. ie: "SDU" is a description. I also have "SDU Addition", and "SDU 2 Storey". When I run my query, if I enter "SDU", it only returns the results with "SDU" and not the others. Is there a way to return the other descriptions as well? Maybe with a wildcard?
    Any assistance would be appreciated.

    Thanks.

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

    Re: Query; User Criteria (Access 2000)

    Welcome to Woody's Lounge!

    If you want to select all records whose description begins with the string supplied by the user, enter this in the criteria line:
    <code>
    Like [Enter Description] & "*"
    </code>
    If you want to select all records whose description contains the string supplied by the user, enter this in the criteria line:
    <code>
    Like "*" & [Enter Description] & "*"</code>

Posting Permissions

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