Results 1 to 3 of 3
  1. #1
    mantooth29 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    21

    Exclamation Subform events do not seem to be firing

    So I have learned that a parent form does not inherently know or respond to any subforms events, excluding OnEnter and OnExit.



    But if I have code in the subform specific to its events, say DblClick on a datasheet subform with a message box "Hi!", should it not fire even if the double click occurs when the parent form is loaded.

    I have been able to code and see the event when working directly on the subform (ie, not loaded via parent form), but when it is loaded in the parent form double clicking in the control elicits no response.

    Am I missing something?

    Code:
    'In Subform Code Module.  This works if only the subform is loaded.
    Private Sub Form_DblClick(Cancel As Integer)
    
        MsgBox "This was a dbl click"
    
    End Sub

  2. #2
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    From what I can see, your code is in the event for the Form double-click, not in the double-click event of the control. Try putting the code in the dbl-click event of the control on the subform. I use this technique in a number of applications, and it works fine.

    HTH

    John

  3. #3
    mantooth29 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    21
    Thank you for the response John. I see what you mean about the Detail_DblClick although I was able to get this working via the form double click. But, I had to recreate the form from scratch to get there. This subform went through several redesigns (with a few name changes) and I'm guessing I hosed one of the event properties in a wizard somewhere.

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

Similar Threads

  1. Subform Events Has No BeforeUpdate Event
    By CementCarver in forum Programming
    Replies: 1
    Last Post: 06-25-2013, 01:53 PM
  2. Replies: 3
    Last Post: 05-23-2013, 05:30 PM
  3. Nested Subform's control events
    By amrut in forum Forms
    Replies: 3
    Last Post: 01-10-2013, 02:19 PM
  4. AfterUpdate not firing
    By newvb in forum Forms
    Replies: 4
    Last Post: 09-29-2011, 04:55 AM
  5. Can't Find Subform Events
    By vdanelia in forum Forms
    Replies: 4
    Last Post: 02-28-2011, 02:23 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