timer and forms

R

roger

I have a form with 2 pages. The user fills out the page 1
and then goes to the page 2 which is a seperate screen.
Once he clicks the FINISH button there he gets back to the
page 1 but in between the time the user actually clicks
the Finish button and comes up to the first page I want to
show a small form which would appear for like 100 milli
seconds and disappear.

How would I do that?
 
B

Bruce M. Thompson

I have a form with 2 pages. The user fills out the page 1
and then goes to the page 2 which is a seperate screen.
Once he clicks the FINISH button there he gets back to the
page 1 but in between the time the user actually clicks
the Finish button and comes up to the first page I want to
show a small form which would appear for like 100 milli
seconds and disappear.

100 milliseconds is only 1/10th of a second. Is that going to be long enough? I
don't know that the form will even become fully visible before it closes again.

In the small form that will be opened, you would set the form's TimerInterval
property to the number of milliseconds desired, then, in the form's "OnTimer"
event procedure, you would insert the following line of code (don't simply enter
this into the "On Timer" property's cell, select "[Event Procedure]" in that
cell and then click on the Build button {...} to open the code window - the
following line of code is entered between the lines "Private Sub Form_Timer()"
and "End Sub"):

DoCmd.Close acForm, Me.Name

Now, when you open that form in the "Finish" button's code, the form will open
and after the specified number of milliseconds, close. I would shoot for more
like 1000 to 1500 milliseconds (1 to 1.5 seconds), minimum, to ensure that the
user is able to see it - longer if there is a message that is longer than one or
two words.
 

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