Results 1 to 4 of 4
  1. #1
    GeorgeJ is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Dec 2014
    Posts
    67

    What event is triggered when you click into a non-modal form from another form?


    Suppose I have 2 non-modal forms, Form1 and Form2 displaying at the same time on the screen. I have my cursor in Form1 and am doing stuff there. Now I move my cursor to Form2 and click somewhere in there but not on a control. What event(s) in Form2's code file are triggered by my clicking into it and giving Form2 the focus? I don't need to know all of the ones triggered, just 1 so that I can put something in its code file.

  2. #2
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    The OnActivate event of the Form should do what you need:


    Code:
    Private Sub Form_Activate()
      'Code goes here
    End Sub

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    GeorgeJ is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Dec 2014
    Posts
    67
    Quote Originally Posted by Missinglinq View Post
    The OnActivate event of the Form should do what you need:


    Code:
    Private Sub Form_Activate()
      'Code goes here
    End Sub

    Linq ;0)>

    That works. Thank you

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Glad we could help!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Replies: 3
    Last Post: 08-21-2014, 07:42 PM
  2. Click event of form?
    By BLFOSTER in forum Programming
    Replies: 3
    Last Post: 04-25-2014, 11:29 AM
  3. Replies: 1
    Last Post: 02-18-2014, 02:16 PM
  4. Dbl Click Event on Form Header
    By drunkenneo in forum Forms
    Replies: 1
    Last Post: 11-18-2013, 04:04 AM
  5. On Click Event For Button On Form
    By Desstro in forum Forms
    Replies: 3
    Last Post: 08-09-2010, 02:36 PM

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