Results 1 to 2 of 2
  1. #1
    mchadwick is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Posts
    71

    Filtering Data in a Subform for a form


    I have a form with a subform I am using to verify the data somewhere else (Active Directory). The form shows the group name and the subform is showing the LANID. I need to modify the data in AD and it works fine the way it is other than the fact that every record for each group is in the form.

    Example:
    FormRecord1 "Wireless"
    Subform for Record1 (linked) "Bob Jones"

    FormRecord2 "Bluecoat"
    Subform for Record2 (linked) no records

    FormRecord3 "Exchange"
    Subform for Record2 (linked) no records

    FormRecord4 "Financial"
    Subform for Record4 (linked) no records

    FormRecord5 "Petty Cash"
    Subform for Record5 (linked) "Bob Jones"

    The only records for the Form I want to see are the ones that have records in the subform. Therefore, the Form records that would show up are FormRecord1 and 5 because they are the only records that have data in the subform. I have over 200 records in the Form, which basicaly means when I go through this process I have to go through each record until I get to a record that has data in the subform.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Could have an unbound combobox or listbox on main form with a RowSource that lists only the groups that have associated LANID records. Then navigate the main form by selecting from the list to go to the relevant record - need code (macro or VBA).

    Another approach is to have the main form RecordSource filtered to only records with associated LANID records:

    SELECT * FROM Groups WHERE GroupID IN (SELECT DISTINCT GroupID FROM LANIDrelatedtable);
    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. Form filtering and adding records to subform
    By Albathien in forum Forms
    Replies: 2
    Last Post: 05-09-2014, 09:31 AM
  2. Replies: 14
    Last Post: 03-11-2013, 09:27 PM
  3. Replies: 1
    Last Post: 10-10-2012, 03:33 PM
  4. Replies: 14
    Last Post: 03-07-2012, 03:46 AM
  5. Data filtering on a form
    By Sam4 in forum Forms
    Replies: 3
    Last Post: 11-23-2011, 05:14 PM

Tags for this Thread

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