Results 1 to 5 of 5
  1. #1
    koncreat is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2015
    Location
    U.S.
    Posts
    43

    using wildcards for user input


    I have a field, shift, that is in the query and is a number field. When the query runs the it prompts the user to enter 1, 2 or 3. What i need to know is it possible for a user to enter a wildcard that will select 1, 2 and 3 and return all records? I have tried * but it doesn't work.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    You can see if this works with the bracketed parameter, and leave it blank for all:

    http://access.mvps.org/access/queries/qry0001.htm

    Most of us use forms to get user input; you have much more control.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,511
    As pbaldy said, better to use field (combobox) on form. But maybe can try this in the criteria for Shift in the query

    Between [First] And [Last]

    To get shift 1 they enter 1 for both values. To get all shifts they enter 1 for First and 3 for Last.

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,928
    * only works with like, not =.

    You can use like on number fields so your user would enter

    1,2,3 or * for all records

    and your criteria for [Shift] would be

    like [Enter 1,2,3 or * for all]

  5. #5
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,421
    If the user can select one or all three, will it never be desirable to select two of the three? There seems to be seven possibilities, yet only four are being offered.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 1
    Last Post: 11-04-2014, 12:07 PM
  2. Replies: 1
    Last Post: 12-30-2012, 07:57 PM
  3. How to take a user input
    By iamraja5 in forum Access
    Replies: 1
    Last Post: 05-12-2011, 10:17 AM
  4. User Input Query
    By ManC in forum Queries
    Replies: 2
    Last Post: 03-04-2010, 07:09 PM
  5. Chart with user input
    By mungyun in forum Access
    Replies: 1
    Last Post: 12-28-2009, 07:44 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