Results 1 to 2 of 2
  1. #1
    jmorjaria is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Feb 2017
    Posts
    1

    Creating a drop down field lis (from the same table)t to select records to include in a query ?


    I have a table with random receipt slip numbers. Some of these I need to include in a query that I am building. How do I create in the criteria row a command that can show me a drop down list to select the receipt slips to include in the query?
    Thanks in advance for any help.
    Jmorjaria

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    You want a pick list in a listbox. make a tPicked table to hold the items picked.
    make a form, 2 list boxes.
    1 lstAvail, holds the items to pick from
    2. lstPicked, holds the items user picked to be in the query

    User dbl-clicks from the lstAvail list, which runs an append query, and appends this option in a 'pick list' table.
    NOTE, ALWAYS refresh the listbox after the query runs (can be done in a macro too)

    Then when all items are picked , put a button at the bottom to run the main query.
    This query joins the tPicked table to the Data table and only those items will show.

    Code:
    sub lstAvail_dblclick()
       docmd.setwarnings false
      docmd.openquery "qaAdd1Item"
      lstpicked.requery     'refresh list
    end sub
    NO CODING.
    just a few queries.
    1 append query to add the user's pick
    1 del query to erase only 1 selected item in the list
    1 del query to erase all items in the list


    Click image for larger version. 

Name:	pick state-lbl.png 
Views:	10 
Size:	34.2 KB 
ID:	27608

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

Similar Threads

  1. Replies: 1
    Last Post: 03-31-2016, 02:52 PM
  2. Replies: 3
    Last Post: 08-26-2015, 12:58 AM
  3. Replies: 4
    Last Post: 03-29-2014, 01:29 AM
  4. Replies: 4
    Last Post: 12-30-2013, 01:49 PM
  5. Replies: 3
    Last Post: 01-24-2013, 08:16 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