From: cr113 on

I've got a form1 that calls form2. The load event of form2 takes
several minutes to run, it has to do a lot of data processing. I'd
like to display some sort of message that either shows how the load is
progressing or at the very least that this is going to take awhile.
The problem is I can't seem to get control of the screen while the
load is taking place, it's basically locked up.
From: cr113 on
On May 29, 4:32 pm, cr113 <cr...(a)hotmail.com> wrote:
> I've got a form1 that calls form2. The load event of form2 takes
> several minutes to run, it has to do a lot of data processing. I'd
> like to display some sort of message that either shows how the load is
> progressing or at the very least that this is going to take awhile.
> The problem is I can't seem to get control of the screen while the
> load is taking place, it's basically locked up.

I forgot to mention I'm using Access 2007.
From: Jeanette Cunningham on
Create another form that shows the message about taking a long time and open
it just before you open the form that is slow to load.
When the slow form has loaded, then you can close the form with the message.

If you want to show a progress bar, there is a sample one in Albert Kallal's
Word Merge sample database.

Open this page
http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

and scroll down to Super Easy Word Merge. Download the 2000 merge code.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


"cr113" <cr113(a)hotmail.com> wrote in message
news:6c1da30b-09df-4b8c-92a9-e6be145583c6(a)42g2000prb.googlegroups.com...
On May 29, 4:32 pm, cr113 <cr...(a)hotmail.com> wrote:
> I've got a form1 that calls form2. The load event of form2 takes
> several minutes to run, it has to do a lot of data processing. I'd
> like to display some sort of message that either shows how the load is
> progressing or at the very least that this is going to take awhile.
> The problem is I can't seem to get control of the screen while the
> load is taking place, it's basically locked up.

I forgot to mention I'm using Access 2007.


From: cr113 on
On May 30, 3:43 am, "Jeanette Cunningham"
<n...(a)discussions.microsoft.com> wrote:
> Create another form that shows the message about taking a long time and open
> it just before you open the form that is slow to load.
> When the slow form has loaded, then you can close the form with the message.


I tried that but couldn't get it to work. The form with the loading
message doesn't display. I tried changing the modal and popup settings
and it still didn't work. Here's my code in form1:

Private Sub Command0_Click()
DoCmd.OpenForm "FormWithLoadMessage"
DoCmd.OpenForm "Form2"
End Sub







>
> If you want to show a progress bar, there is a sample one in Albert Kallal's
> Word Merge sample database.
>
> Open this pagehttp://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html
>
> and scroll down to Super Easy Word Merge. Download the 2000 merge code.
>
> Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
>
> "cr113" <cr...(a)hotmail.com> wrote in message
>
> news:6c1da30b-09df-4b8c-92a9-e6be145583c6(a)42g2000prb.googlegroups.com...
> On May 29, 4:32 pm, cr113 <cr...(a)hotmail.com> wrote:
>
> > I've got a form1 that calls form2. The load event of form2 takes
> > several minutes to run, it has to do a lot of data processing. I'd
> > like to display some sort of message that either shows how the load is
> > progressing or at the very least that this is going to take awhile.
> > The problem is I can't seem to get control of the screen while the
> > load is taking place, it's basically locked up.
>
> I forgot to mention I'm using Access 2007.

From: Jeanette Cunningham on
I would use the 'form with load message' to open form2.
You could use the current event of 'form with load message' to open form2
hidden.
At the last line of code in the load event of form2, you could make form2
visible then close 'form with load message'.

You mentioned that there is a lot of code on form2 that runs, perhaps some
or all of that code could be run before you open form2?
There are variations on the way to do this, depending on what that long
running code is doing and where it gets the values it needs to be able to
run.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"cr113" <cr113(a)hotmail.com> wrote in message
news:3b3c91ec-35a0-4108-be66-ee8a8e48ae9a(a)t34g2000prd.googlegroups.com...
On May 30, 3:43 am, "Jeanette Cunningham"
<n...(a)discussions.microsoft.com> wrote:
> Create another form that shows the message about taking a long time and
> open
> it just before you open the form that is slow to load.
> When the slow form has loaded, then you can close the form with the
> message.


I tried that but couldn't get it to work. The form with the loading
message doesn't display. I tried changing the modal and popup settings
and it still didn't work. Here's my code in form1:

Private Sub Command0_Click()
DoCmd.OpenForm "FormWithLoadMessage"
DoCmd.OpenForm "Form2"
End Sub







>
> If you want to show a progress bar, there is a sample one in Albert
> Kallal's
> Word Merge sample database.
>
> Open this
> pagehttp://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html
>
> and scroll down to Super Easy Word Merge. Download the 2000 merge code.
>
> Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
>
> "cr113" <cr...(a)hotmail.com> wrote in message
>
> news:6c1da30b-09df-4b8c-92a9-e6be145583c6(a)42g2000prb.googlegroups.com...
> On May 29, 4:32 pm, cr113 <cr...(a)hotmail.com> wrote:
>
> > I've got a form1 that calls form2. The load event of form2 takes
> > several minutes to run, it has to do a lot of data processing. I'd
> > like to display some sort of message that either shows how the load is
> > progressing or at the very least that this is going to take awhile.
> > The problem is I can't seem to get control of the screen while the
> > load is taking place, it's basically locked up.
>
> I forgot to mention I'm using Access 2007.