Results 1 to 5 of 5
  1. #1
    vicrauch is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    Sacramento
    Posts
    27

    What code runs before form Open?

    When I open a form some code is running before the Form Open routine. How can I find out where this code is? I am double clicking on the form name within the Objects list that I want to open. But some code is running before the Open form code. I have no idea where this code is or how it gets started to run.

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Open the form in Design mode. Open the forms Property Sheet and Select the Events Tab. You should be able to go down the list and see which events have an Event Procedure or an Embedded Macro.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    orange's Avatar
    orange is online now Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716

  4. #4
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    The subforms get loaded before the main form so you should check the code in any of those.
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    What is this mystery code actually doing?

    How do you know that it's running?

    Are you running the Form immediately after opening the Database?

    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: 8
    Last Post: 08-22-2020, 01:15 PM
  2. Code that runs one time only
    By shod90 in forum Forms
    Replies: 1
    Last Post: 01-03-2017, 05:09 AM
  3. Query runs before On Open Event Procedure
    By shuddle in forum Access
    Replies: 3
    Last Post: 12-21-2016, 01:36 PM
  4. Code Runs Perfectly... Every other time.
    By offie in forum Programming
    Replies: 5
    Last Post: 08-14-2013, 03:45 PM
  5. Making sure code runs regardless
    By nvrwrkn in forum Programming
    Replies: 2
    Last Post: 10-09-2012, 11:39 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