Results 1 to 2 of 2
  1. #1
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038

    Need to pass query results (with filter) into form's listbox

    Experts:

    I need some help with outputting *query results* (based on a filter) and display the results in a form (preferably in an unbound listbox... if necessary in a subform).

    Attached is a subset of my database. The sample database includes various tables, queries, and forms. For the purposes of this question, the focus is on the following:

    1. Form "F00_Billets" -- includes a combo "Go To" and 2 tabs ("General" and "CFT | WS")
    2. Query "Q00_CFT" -- shows all CFT (Cross-Functional Team) assignments for any of the 7 staff members (assigned via form "F50_BilletsToCFTs")
    3. Query "Q00_WS" -- shows all WS (Watch Stations) assignments for any of the 7 staff members (assigned via form "F54_BilletsToWSs")

    Query "Q00_CFT" outputs the following (summarized):
    - For example, staff member = "Doris Day" is assigned to CFT = "Scheduling", "Operations", and "Accounting"
    - Alternatively, staff member = "Clint Eastwood" is assigned to CFT = "Accounting" only


    - etc. etc.

    Alternatively, Query "Q00_WS" outputs the following (summarized):
    - For example, staff member = "Doris Day" is not assigned to any watch station
    - Alternatively, staff member = "Clint Eastwood" is assigned to WS = "Research"
    - etc. etc.

    ... so far so good!

    Here's what I need some help with:
    - Upon opening form "F00_Billets", select any staff member from the combo box... currently, it shows BIN and Billet Title on the "General" tab.
    - Switch to the 2nd tab "CFT/WS"... this tab includes two (2) unbound listboxes.
    - In the event I selected staff member = "Doris Day", I want to show "Scheduling", "Operations", and "Accounting" in the first listbox. And, given that Ms. Day is NOT assigned to any WS (per query "Query "Q00_WS"), I want the 2nd listbox to be empty. Naturally, if I assign her name to a WS (via form "F54_BilletsToWSs"), I want the selected WS value to be displayed in the associated WS listbox.
    - Same applies to all other staff members...
    - That is, if I select "Clint Eastwood" from the drop-down ("F00_Billets"), I want to show "Accounting" and "Research" in the two listboxes, respectively.

    How can this be accomplished? Thousand thanks in advance!
    EEH
    Attached Files Attached Files

  2. #2
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038
    Never mind... I figured it out.

    Cheers,
    EEH

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

Similar Threads

  1. Pass listbox value into query criteria
    By skydivetom in forum Programming
    Replies: 3
    Last Post: 10-16-2019, 02:23 PM
  2. Replies: 2
    Last Post: 06-19-2018, 12:52 PM
  3. Replies: 4
    Last Post: 03-27-2018, 12:30 PM
  4. Replies: 1
    Last Post: 07-10-2013, 08:57 AM
  5. Pass a Form Filter to a Query
    By kenton.l.sparks@gmail.com in forum Programming
    Replies: 4
    Last Post: 04-01-2011, 11:48 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