launch copywrite/tite page while loading main form

G

Guest

I am an extreme amateur in Access.

I have hidden my database and set the default form at launch to be a
copywrite/title form. I want to use an ontimer event so my copywrite/title
form remains open while my main form loads and displays behind it. Then, at
end of timer the copywrite/title form closes allowing user to view and access
the main form.

I cannot determine how to accomplish this. Will someone kindly take pity on
me?
 
F

fredg

I am an extreme amateur in Access.

I have hidden my database and set the default form at launch to be a
copywrite/title form. I want to use an ontimer event so my copywrite/title
form remains open while my main form loads and displays behind it. Then, at
end of timer the copywrite/title form closes allowing user to view and access
the main form.

I cannot determine how to accomplish this. Will someone kindly take pity on
me?

Here's all the coding you will need.

Set the Form's Timer Interval to 1000.
Dim Aclock up in the form's code Declarations section.

Option Compare Database
Option Explicit
Dim Aclock As Date
=================

Then code the form's Load and Timer events:

Private Sub Form_Load()
Aclock = Time()
End Sub
==========
Private Sub Form_Timer()
If DateDiff("s", Aclock, Time()) = 3 Then
DoCmd.OpenForm "Switchboard"
DoCmd.Close acForm, Me.Name
End If
End Sub
===========

When opened, the form's Aclock variable will be set to the current
time.
The Timer event will then, at one second intervals compare the Aclock
time to the current time. When the difference is 3 seconds, the Splash
form will open the Main Switchboard and close itself.
 

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