macro opening up multiple forms??

jammy_owen

Registered User.
Local time
Today, 13:09
Joined
Dec 13, 2002
Messages
13
Hi guys, this is my first post!!
anyway, i would like to know if there is a way in which i can make a macro that closes one form, opens another, then 1 second later, closes that form then opens another one.
The result of this would be my splashscreen opening, then 1 sec later, it closes that and opens up a form weith "3" in it, then, after 1 sec it opens up "2", then "1", then finally opens up my switchboard.
then the message would end up being, 'The switchboard will open up in...3...2...1...switchboard'.
ive already tried and it don't seem to work so if anyone can help me on this problem i would be very greaful!!
 
Why bother using a macro and a number of forms with this task when it is possible to do it with one?

On the splash form, let's call it frmSplash set the Timer Interval to 1000.

On frmSplash have a label at the top that says "The switchboard will open in..."

and in the centre of frmSplash have a huge label that can display your 3,2,1 thing. Call that lblNumber.

On the form, outwith any procedure put this bit of code:

PHP:
Dim intIndex as Integer

On the form's On Load event, put the following code:

PHP:
intIndex = 0

Finally, in the form's On Timer event, put the following code.

PHP:
Select Case intIndex
   Case = 1
      lblNumber.Caption = 3
   Case = 2
      lblNumber.Caption = 2
   Case = 3
      lblNumber.Caption = 1
   Case Else
      DoCmd.Close
      DoCmd.OpenForm "frmSwitchboard"
End Select

intIndex = intIndex + 1


Where frmSwitchboard is the form you are loading after the countdown.
 

Users who are viewing this thread

Back
Top Bottom