Results 1 to 6 of 6
  1. #1
    GrtSlvrDrgn is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Mar 2017
    Posts
    3

    Remove listbox items from matching subform table.

    Is it possible to remove items listed in a listbox from duplicate values in a subform table field?


    Both the listbox and subform table have matching fields and I want to remove matching records from being shown in the listbox.
    The listbox is populated by a table different than the subform table, but both have the same fields.

    Any help is appreciated.

    Thanks.

  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
    Does the unmatched query wizard produce the desired result? If so, it could be the row source of the listbox.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    GrtSlvrDrgn is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Mar 2017
    Posts
    3
    It's kind of more complicated that that. This is a training database and I have a form that shows an employee's record. On that form I have a table in a subform [Events] that is the employee's training record [Training Records] table. The form also has a listbox that shows all training available from the [Training] table. What I have been struggling to do is eliminate the listbox training items that are already attached to that employee's record. The training and training record tables have a key field [ID]. Thanks for the suggestion.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Should still work, though you probably have to query the training the person has done for one side of it. Can you attach the db here?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    GrtSlvrDrgn is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Mar 2017
    Posts
    3
    I am not that familiar with that particular query and I could not get it to work. I think it only looks for the ID in the entire table regardless of which Employee is assigned to. Attached is the DB and the employee records form is where my complicated issue exists.

    On the form you will notice the subform table showing all training completed by the employee and to the right of it a listbox showing all training that is in the DB, I want that listbox to show only training that the employee hasn't done (as in not shown on the subform table)

    Thanks for the help.
    Attached Files Attached Files

  6. #6
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Create an unmatched query by using the Query Wizard, it will ask you which tables and which fields you want to find. use this query for your list box as Paul has been saying, showing all training records that are unmatched on the employee's training table.

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

Similar Threads

  1. Replies: 16
    Last Post: 03-31-2020, 10:19 AM
  2. Replies: 4
    Last Post: 07-26-2016, 02:53 AM
  3. Subtract ListBox items in field of a table
    By Electricks21 in forum Access
    Replies: 2
    Last Post: 09-26-2014, 10:31 PM
  4. Replies: 8
    Last Post: 11-18-2013, 10:16 AM
  5. Replies: 3
    Last Post: 04-13-2012, 10:39 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