Results 1 to 4 of 4
  1. #1
    mlrucci is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2018
    Posts
    202

    double click on a list to open record


    I have a navigation form with a tab for Admin. On that form, there are several subforms. The subforms have a list that corresponds with the records in that subform. I want to double click on the list for that subform (Record Source is a table) to go to that specific record. I use to have this as a single form with the vba
    Private Sub lstAttendance_DblClick(Cancel As Integer)
    Dim strCriteria As String
    strCriteria = "[AttendanceID] = " & Me.lstAttendance.Column(0)
    DoCmd.OpenForm "frmAdminAttendance", , , strCriteria, , acDialog
    End Sub

    but as expected, on double click, it opens the main form and does not stay on the Navigation subform as desired. Can anyone help?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Instead of opening a form you just want to find record on the open form? Options are to apply filter or search and move. Search and move can use DoCmd.FindRecord command or involve RecordsetClone and Bookmarks.
    Last edited by June7; 07-29-2018 at 07:37 PM.
    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
    mlrucci is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2018
    Posts
    202
    First, I would like to thank you for your response. Yes, I would like to open the selected record within the currently open form. The list is based on a qry with the ID in row 0. I am fairly inexperienced with vba/Access and am unfamiliar with the above suggestions. Can you please provide more information.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    This question has been asked and answered many times.
    If you search web and forum on the keywords should find many examples. When you have code specific to your db and have issue, post question.
    Last edited by June7; 07-29-2018 at 10:21 PM.
    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. Replies: 6
    Last Post: 02-28-2017, 09:33 AM
  2. Replies: 8
    Last Post: 02-04-2016, 05:10 PM
  3. Replies: 2
    Last Post: 10-29-2014, 03:25 AM
  4. double click to open
    By spleewars in forum Programming
    Replies: 7
    Last Post: 05-22-2012, 11:52 AM
  5. Replies: 10
    Last Post: 02-20-2012, 11:25 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