PC Review


Reply
Thread Tools Rate Thread

Form_load Vs. Form_Open

 
 
Guest
Posts: n/a
 
      29th Aug 2003
Hi,

Is there anyone knows the difference between Form_load and
Form_Open?

Thanks!

XR
 
Reply With Quote
 
 
 
 
Rick Brandt
Guest
Posts: n/a
 
      29th Aug 2003
<(E-Mail Removed)> wrote in message
news:021e01c36e5f$98146dd0$(E-Mail Removed)...
> 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.


 
Reply With Quote
 
 
 
 
Larry
Guest
Posts: n/a
 
      29th Aug 2003
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

 
Reply With Quote
 
Dirk Goldgar
Guest
Posts: n/a
 
      29th Aug 2003
<(E-Mail Removed)> wrote in message
news:021e01c36e5f$98146dd0$(E-Mail Removed)
> 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)


 
Reply With Quote
 
Guest
Posts: n/a
 
      29th Aug 2003
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".]

:-)
 
Reply With Quote
 
tina
Guest
Posts: n/a
 
      29th Aug 2003
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
>.
>

 
Reply With Quote
 
Van T. Dinh
Guest
Posts: n/a
 
      29th Aug 2003
> 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" <(E-Mail Removed)> wrote in message
news:bioadm$b9ogt$(E-Mail Removed)-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.
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading module variables in Form_Load which are initialized in Form_Open Bob Hairgrove Microsoft Access Form Coding 4 6th Feb 2006 08:21 PM
Event weirdness in form_open and form_load (threading issues??) =?Utf-8?B?Um9iYmll?= Microsoft Access Form Coding 0 2nd Feb 2006 08:29 PM
Problem querying combobox during Form_Open Max Yaffe Microsoft Access Form Coding 1 8th Mar 2005 07:18 AM
What is difference between Form_Load and Form_Open? Edward P Sager Microsoft Access Form Coding 5 18th Aug 2004 05:58 AM
Form_Open VS. Form_Load Norbert Microsoft Access Forms 2 14th Nov 2003 06:55 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:54 AM.