Re: Displaying a "Please wait..." Form
- From: "Dale Fye" <dale.fye@xxxxxxxxxx>
- Date: Sat, 4 Jun 2005 23:25:57 -0400
I don't know what these other references say, but from your other comments,
it appears that they are not doing the job.
In the main forms Open or Load event, (whereever your code is that runs all
your querys) add a couple of lines of code that open your Please Wait form
and hide your main form. This should be before any of the other code in
this module. I would add an OK button to this form, but hide it initially,
we will make it visible later. In the buttons click event, add some code
that will close the form and make the main form visible again.
docmd.openform "frm_PleaseWait"
me.visible = false
Because you did not open this form with the acDialog argument, the code in
your main form should continue to run. When that code is complete, make the
OK button on your please wait form visible.
Forms("frm_PleaseWait").cmd_OK.visible = true
Another thing you might want to consider is to limit the number of subforms
(you didn't mention it, but I'm assuming you have a tab on your form with
separate subforms on each tab. I have found that you can use a tab control,
but get away with having only a single subform that you display over the
tab, but which is not actually controlled by the tab. Then when you select
a new tab, change the source object for this single subform, so that it acts
like you have multiple subforms, but does not take nearly as long to load
when the form is opened.
Another thing I have found useful when a form takes a long time to render
itself is to put the code I used to put in the Open event of the form in the
timer event. This way, the form gets a chance to be displayed while your
startup code is executing. When I do this, I usually set the forms
RecordSource to blank and then set it in the code I run in the Timer Event.
I initially set the forms timerInterval to about 100, then the first line of
the TimerEvent code resets the TimerInterval to zero to prevent it from
firing again.
HTH
Dale
"LTofsrud" <LTofsrud@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:78CD7E81-FEF1-4983-BA52-C522196985D1@xxxxxxxxxxxxxxxx
> Good afternoon all.
>
> I have a screen that has several subforms and a lot of fields doing
> queries
> at startup (around 107 or so). It takes about 1.5 minutes to complete and
> I
> would like to display a custom form that states what is taking place and
> it
> also gives them tips as to how the form works (since it somewhat complex).
>
> I have my form complete but I am not sure how I could get the form to show
> for just that the time that the user is waiting for the queries to finish
> executing.
>
> I tried placing a conditional check for the last textbox as to whether its
> Control Source was set yet but that either seemed really slow or it just
> plain didn't work.
>
> Has anyone done this before or have any ideas as to how I might be able to
> go ahead with this?
>
> Thanks everyone and have a great weekend!
>
> Lance
.
- References:
- Displaying a "Please wait..." Form
- From: LTofsrud
- Displaying a "Please wait..." Form
- Prev by Date: Re: Set Access 2003 Listbox recordset via code?
- Next by Date: Re: Set Access 2003 Listbox recordset via code?
- Previous by thread: Re: Displaying a "Please wait..." Form
- Next by thread: Keep users from directly opening the backend database.
- Index(es):
Loading