Form_load Vs. Form_Open

Discussion in 'Microsoft Access' started by Guest, Aug 29, 2003.

  1. Guest

    Guest Guest

    Hi,

    Is there anyone knows the difference between Form_load and
    Form_Open?

    Thanks!

    XR
     
    Guest, Aug 29, 2003
    #1
    1. Advertisements

  2. Guest

    Rick Brandt Guest

    <> wrote in message
    news:021e01c36e5f$98146dd0$...
    > Hi,
    >
    > Is there anyone knows the difference between Form_load and
    > Form_Open?


    Open is before the data is loaded. Load is after. (seems obvious now right?) You
    can do some things in Open that you can't do in Load (like cancel the open) and there
    are some things where only Load works (like testing values in controls). The help
    file explains all of this.
     
    Rick Brandt, Aug 29, 2003
    #2
    1. Advertisements

  3. Guest

    Larry Guest

    When you open a form the sequence of events is
    open
    load
    resize
    activate
    current
    Access gives you a chance to do a procedure at any one of
    these steps.
    When you close a form the sequence of events is
    Unload
    Deactivate
    Close
    >-----Original Message-----
    >Hi,
    >
    >Is there anyone knows the difference between Form_load

    and
    >Form_Open?
    >
    >Thanks!
    >
    >XR
    >.
    >You can have a form loaded by not activated. An open form
     
    Larry, Aug 29, 2003
    #3
  4. Guest

    Dirk Goldgar Guest

    <> wrote in message
    news:021e01c36e5f$98146dd0$
    > Hi,
    >
    > Is there anyone knows the difference between Form_load and
    > Form_Open?
    >
    > Thanks!
    >
    > XR


    The help file does. Did you look there first?

    ---- quoting from help entries ----
    Open Event
    The Open event occurs when a form is opened, but before the first record
    is displayed.

    Load Event
    The Load event occurs when a form is opened and its records are
    displayed.

    When you first open a form, the following events occur in this order:

    Open ==> Load ==> Resize ==> Activate ==> Current

    If you're trying to decide whether to use the Open or Load event for
    your macro or event procedure, one significant difference is that the
    Open event can be canceled, but the Load event can't. For example, if
    you're dynamically building a record source for a form in an event
    procedure for the form's Open event, you can cancel opening the form if
    there are no records to display.
    ---- end of quote ----

    The form's Open event occurs before the form's recordsource is queried,
    making it a good time to set or modify the recordsource. Note that it
    is possible to execute code in an event procedure for the form's Open
    event that forces the recordsource to be queried and the Load event to
    fire before the Open event procedure finishes.

    --
    Dirk Goldgar, MS Access MVP
    www.datagnostics.com

    (please reply to the newsgroup)
     
    Dirk Goldgar, Aug 29, 2003
    #4
  5. Guest

    Guest Guest

    Thanks for all your replay. I also found the answer from
    Access Help.

    [ I was looking for "Form_load" nad "Form_open", I should
    search on "Open Event".]

    :)
     
    Guest, Aug 29, 2003
    #5
  6. Guest

    tina Guest

    i can understand how you'd have trouble finding the topic
    in Help - Access Help is murder to try to find info on
    something you don't already know!
    here's a tip you may not know about: in a form or report
    design view, you can open the Properties box and click on
    a specific property or event line, and then press F1 - it
    will usually take you directly to the appropriate topic in
    Help. this works in table design view from the Field
    Properties section, and in macro design view from the
    Action Arguments section, also.

    hth


    >-----Original Message-----
    >Hi,
    >
    >Is there anyone knows the difference between Form_load

    and
    >Form_Open?
    >
    >Thanks!
    >
    >XR
    >.
    >
     
    tina, Aug 29, 2003
    #6
  7. Guest

    Van T. Dinh Guest

    > Open is before the data is loaded

    Not quite. If you do a Debug.Print of some Field (or bounded Control?), you
    find that there is a value already. Even if you do a RecordCount of the
    Form's Recordset, it is > 0.

    --
    HTH
    Van T. Dinh
    MVP (Access)



    "Rick Brandt" <> wrote in message
    news:bioadm$b9ogt$-berlin.de...
    >
    > Open is before the data is loaded. Load is after. (seems obvious now

    right?) You
    > can do some things in Open that you can't do in Load (like cancel the

    open) and there
    > are some things where only Load works (like testing values in controls).

    The help
    > file explains all of this.
    >
    >
     
    Van T. Dinh, Aug 29, 2003
    #7
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brent Burkart

    Access 97 form_load problem

    Brent Burkart, Aug 3, 2004, in forum: Microsoft Access
    Replies:
    1
    Views:
    259
    Dirk Goldgar
    Aug 4, 2004
  2. (PeteCresswell)

    Checkboxes: Dynamically Adding At Form_Load?

    (PeteCresswell), Sep 13, 2006, in forum: Microsoft Access
    Replies:
    1
    Views:
    187
    Guest
    Sep 13, 2006
  3. Eric
    Replies:
    1
    Views:
    486
    Rick A.B.
    Oct 3, 2007
Loading...

Share This Page