How to display progress on slow opening form.

C

cr113

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.
 
C

cr113

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.
 
J

Jeanette Cunningham

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


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.
 
C

cr113

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
 
J

Jeanette Cunningham

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

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top