Results 1 to 7 of 7
  1. #1
    lborn is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2017
    Posts
    7

    Double Click Event to open different subform to specific record

    Good day!

    I previously had a Navigation Form set up with multiple tabs and forms. On one form I was able to double click on a record and use the "docmd.browseto" function to move to a different form to that specific record.

    I have had to move away from using the Navigation form, and now have a main form with toggle buttons that select which subform to show. In the subform, there are more toggle buttons that select which form to show.

    How do I now code the navigation from the double click event?



    The main form is called NavForm
    The main subform is called NavFormSubForm
    In this case, the form that contains the sub toggle buttons is called NavFormSubFormEquipment
    The subform on that is called ChildEquipment
    The form with the double click event is frm_EquipmentFilter
    The form I want to navigate to is frm_EquipmentAll

    I hope this is enough information to get my question across. Please let me know if I am leaving anything out.

    Thank you for your help!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Double Click event on what? How about a screen shot so we can better understand what you are working with. Better yet, zip up your db and post it if that is possible, removing any sensitive data of course.

  3. #3
    lborn is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2017
    Posts
    7
    Sorry, double click on a record in the continuous subform.

    Unfortunately the database doesn't work all that well if I remove all of the sensitive information. I have created snapshots though that I hope will help.

    From this attached file "frm_EquipmentFilter" I would like to double click on a row (record) and have that record displayed on the other form "frm_EquipmentAll". The snag is that the form is "controlled" by toggle buttons that choose which form is shown in the subform. I hope the images help explain how it is set up.
    Attached Thumbnails Attached Thumbnails frm_EquipmentAll.JPG   frm_EquipmentFilter.JPG  

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    It is an interesting interface but I'm afraid this old brain still does not understand what you want to happen. Sorry.

  5. #5
    NTC is offline VIP
    Windows 10 Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    Is not clear exactly which step you need assist with. Does the double click event fire? Test that with something simple like generate a message box that says OK.

    If the double click event does fire - then you want to put code in that event to open frm_EquipmentAll. Does this work?

  6. #6
    lborn is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2017
    Posts
    7
    Hi,

    I have been trying to figure out how to word this better. The double click event does fire, it's just that I'm not giving it the right commands for what I want.

    If it were a regular set up, I would use DoCmd.OpenForm "frm_EquipmentAll", acNormal, , "EquipID=" & Me.EquipID.

    However, why I'm struggling is because I don't want it to open a form like a pop up form, I want it to open in the subform...the same subform where I'm double clicking from....

    Is there a way to set focus to the button "ToggleEquipmentAll" and when the form loads it goes to that EquipID? Because if the button has focus it shows that form.... or is this just not possible because they share an unbound subform?

  7. #7
    NTC is offline VIP
    Windows 10 Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    A form open event and a sub form are conceptually opposites. If you are attempting to manage a sub form you should probably work with its visibility property.

    All in all - I can't say I think the design approach sounds practical, and there are times when one should modify one's vision with what the technology more easily provides. An unbound sub form probably should not be a sub form, but instead just open as a form - and using today's default tabbed forms - is then the next tabbed form...and teach the users to rely on the tabs to go between data.

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

Similar Threads

  1. Replies: 8
    Last Post: 02-04-2016, 05:10 PM
  2. Replies: 3
    Last Post: 07-22-2015, 03:45 AM
  3. Replies: 1
    Last Post: 07-14-2015, 05:59 AM
  4. Replies: 2
    Last Post: 10-29-2014, 03:25 AM
  5. Replies: 10
    Last Post: 02-20-2012, 11:25 AM

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