Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jan 2003
    Location
    Central Florida, USA
    Posts
    505
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Forms - OnLoad vs OnOpen (All versions)

    Is there a reference book, or web link that shows the order in which events are executed? For example, Which loads first, OnLoad or OnOpen (or OnCurrent). What are the advantages of using both, and not just one?

    Thanks in advance for your ideas and references.

    Ken

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Forms - OnLoad vs OnOpen (All versions)

    See Load Event [Access 2003 VBA Language Reference]. It's similar for other versions of Access. The order is

    Open > Load > Resize > Activate > Current

    The On Open event can be canceled, so if you need to prevent the form from being opened under some conditions, you should use this. But it occurs before the record source is loaded, so if you need to do something with the data, the On Load event is better.

  3. #3
    4 Star Lounger
    Join Date
    Jan 2003
    Location
    Central Florida, USA
    Posts
    505
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Re: Forms - OnLoad vs OnOpen (All versions)

    Hans,

    thank you for help. You are awesome!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •