Results 1 to 5 of 5
  1. #1
    wdrspens is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Posts
    35

    Entering Criteria in a Query

    I have a query upon which a report is based and in order to ensure that I obtain all the records relating to a particular customer I use the following expression in the Criteria row under the Names field: Like "*" & [Enter Customer Name] & "*"


    Very occasionally I wish to report on only one record of a particular customer and can achieve that by using [Enter Number:] in the Criteria field on the same line, and then entering both the number and the name when running the query. However if I want all the records, rather than a specific record, I now do not get any of the records for the given name.
    Can anyone suggest how I can get all the relevant records most of the time but only one record occasionally for any given name.
    Many thanks
    David

  2. #2
    kennejd is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    188
    How about Like [Enter Number:] & "*". When you want all records, enter * at the prompt.

  3. #3
    wdrspens is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Posts
    35
    Thanks - that works at the moment and should continue to work. Do I have to enter the "*" at the prompt, or can I just hit Enter?

    Many thanks

    David

  4. #4
    kennejd is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    188
    You should be able to just hit enter...try it and see.

  5. #5
    wdrspens is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Posts
    35
    I have tried it and I can just hit enter. Thanks

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Entering more than one item when prompted?
    By 10 Gauge in forum Reports
    Replies: 10
    Last Post: 03-23-2011, 08:47 AM
  2. Query Criteria
    By sbrookebounds in forum Access
    Replies: 0
    Last Post: 12-08-2010, 03:07 PM
  3. Query Criteria
    By combine21 in forum Queries
    Replies: 12
    Last Post: 09-08-2010, 01:06 PM
  4. Query Criteria
    By MrMitch in forum Queries
    Replies: 0
    Last Post: 03-31-2009, 02:25 PM
  5. Entering query results in a form
    By marcello.dolcini in forum Forms
    Replies: 0
    Last Post: 04-15-2007, 06:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums