Results 1 to 3 of 3
  1. #1
    fhickler is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Nov 2018
    Posts
    30

    Button on form queries subform


    I'm learning some basics and would really appreciate a step-by-step guide for doing something that is probably pretty elementary for many of you.

    This is my table:

    ID First_Name Last_Name Old_Status New_Status
    1 Jane Doe 3 2
    2 Jon Smith 2 2
    3 Mary Jones 4 5
    4 Jim Miller 3 3

    I want to create a form with this table displayed as a subform in datasheet view. Then I want a button on that same form that, when clicked, selects just the records where Old_Status = New_Status and displays the results in the subform itself. I'm using Access 2007.

    Thanks.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    See if this article helps http://allenbrowne.com/ser-62.html

    Button on main form and code in Click event like:

    Me.SubformContainerName.Form.Filter = "[Old_Status]=[New_Status]"
    Me.SubformContainerName.Form.FilterOn = True
    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.

  3. #3
    fhickler is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Nov 2018
    Posts
    30
    Well that was easy. Thanks.

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

Similar Threads

  1. Replies: 11
    Last Post: 03-14-2019, 09:30 PM
  2. Replies: 6
    Last Post: 08-22-2016, 02:31 PM
  3. Replies: 2
    Last Post: 03-13-2015, 08:34 AM
  4. Form-Subform-Button-RecordSelect
    By TechKEYS in forum Access
    Replies: 7
    Last Post: 01-14-2015, 10:08 PM
  5. Replies: 5
    Last Post: 12-19-2012, 01:05 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