Results 1 to 4 of 4
  1. #1
    Rzgar is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Aug 2019
    Posts
    2

    Post Double click event to filter a subform

    Hi there! I am creating a simple database to manage the basic information of my patients.
    My problem: double clicking an older visit should bring that visit in to the main screen. But I can't manage to do that..


    The structure of the form: both the older visits list and the current visit are based on the same table and they are both a subform in the main form.
    Your help is appreciated..
    Attached Thumbnails Attached Thumbnails hh.png  
    Last edited by Rzgar; 08-28-2019 at 12:43 PM.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    both forms should be linked to the master key on top:

    LinkMasterField: ClienId.
    linkChildField: ClienId.

  3. #3
    Rzgar is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Aug 2019
    Posts
    2
    Thank you for the reply. I've already done that. My question however is how to filter one subform by double clicking on the date field of the the other subform.

  4. #4
    accesstos's Avatar
    accesstos is offline Expert
    Windows XP Access 2007
    Join Date
    Dec 2018
    Location
    Greece
    Posts
    551
    Hi Rzgar!

    Give a try to this:
    Code:
    With [forms]![frmMain]![sfrmVisit].form
        .Filter = "VisitDate=#" & me![olderVisitDate] & "#"
        .FilterOn = True
    End With
    Replace the names in red with the actual names of your controls.

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

Similar Threads

  1. Link two forms together
    By Ramtrap in forum Forms
    Replies: 2
    Last Post: 10-11-2017, 05:55 PM
  2. link 2 or 3 forms
    By Mariapaiva in forum Database Design
    Replies: 4
    Last Post: 05-27-2014, 04:26 AM
  3. Link 2 forms
    By AussieGal in forum Access
    Replies: 5
    Last Post: 02-14-2013, 09:19 PM
  4. Multiple forms or embedded sub-forms
    By Juicejam in forum Forms
    Replies: 2
    Last Post: 08-23-2011, 07:31 AM
  5. Link to Forms
    By Luke in forum Forms
    Replies: 1
    Last Post: 07-14-2011, 08:51 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