Results 1 to 3 of 3
  1. #1
    ecalvert47462 is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    17

    can you enter multiple selections in a parameter prompt?


    All, I am working in Access 2010....and I have a simple query that grabs just a few fields from a table and puts them in a reporty..they are:

    Workcenter
    Date Ordered
    Date Shipped
    Dollar Value

    And there are 6 different workcenters that can be chosen, like: A, B, C, D, E, F.....and when the user presses the button to run the report then it prompts them to enter a Workcenter code...so they can enter A and then the query runs and returns all the stuff that workcenter A did....which that works great.

    But what i want to do is group some of them together like if workcenter D, E and F needed to be pulled is it possible for the user to enter one character, for example if D, E and F were grouped together as maybe X...how would I make it to where the end user can enter X and it brings back results from D, E and F...instead of them running it 3 seperate times to get those results.

    Thanks

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I don't normally use parameterized queries. I imagine you could create an expression that would include multiple criteria for a single field by using the AND operator. The only problem is that you would have to hard code how the number of criteria. For instance, if the user only wants to include A, B ,and C one day and then include A,B,C, D, and E the next day, the parameterized query will not work.

    I would use a list box. This would require VBA

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,962
    And here is the code http://allenbrowne.com/ser-50.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 5
    Last Post: 04-25-2013, 01:55 AM
  2. Query parameter prompt - Format message
    By daved292 in forum Queries
    Replies: 2
    Last Post: 06-08-2012, 11:09 AM
  3. Report Parameter Prompt
    By leamas in forum Access
    Replies: 7
    Last Post: 05-31-2012, 02:07 PM
  4. Replies: 13
    Last Post: 01-10-2012, 09:56 AM
  5. Get parameter prompt
    By yawalias in forum Queries
    Replies: 1
    Last Post: 12-22-2011, 09:25 AM

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