show splash & switchboard when file loads?

A

AJB

Is there a way to show both a splash and then the switchboard when my db
loads? It appears that Switchboard Manager makes me choose between the 2.

thanks for the assistance,

Andy
 
K

Klatuu

Assuming your Splash screen uses the timer event to close itself after a
specified time, you can open the switchboard just prior to closing the splash
screen in the timer event.
 
F

fredg

Is there a way to show both a splash and then the switchboard when my db
loads? It appears that Switchboard Manager makes me choose between the 2.

thanks for the assistance,

Andy

Set the Splash form to open with the database.
Tools + StartUp

Select the Splash form's name in the Display Form/Page drop-down.

Set the Splash form's Timer Interval to 5

Dim a Variable up in the form's code declarations section:

Option Compare Database
Option Explicit
Dim dteStartTime as Date

Code the form's Open event
dteStartTime = Time()

Code the Timer event:
If DateDiff("s",dteStartTime,Time()) >=5 then
DoCmd.Close acForm, Me.Name
End If

Code the Splash Form's Closes event:

DoCmd.OpenForm "SwitchboardName"

The above should close the splash form in 5 seconds and open the
switchboard.
 
J

John Spencer

Display the splash screen.

In one of the splash screen's events you can call the switchboard. I
usually use the timer event

Private Sub Form_Timer()
DoCmd.OpenForm "Switchboard"
DoCmd.Close acForm, "SplashForm"
End Sub

I set the Timer property to 5000 (or however many milliseconds I want the
screen to display).


--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
A

AJB

I don't have a timer event with my splash page.

I think I don't have the familiarity with Access just yet to be able to
correctly follow the assistance you all have offered.

After I was unable to make each of your suggestions work, I toyed with
adding a button that would close the splash page and open the switchboard.
This is my code:

Private Sub gotosw_Click()
On Error GoTo Err_gotosw_Click
DoCmd.Close
Exit_gotosw_Click:
Exit Sub
Err_gotosw_Click:
MsgBox Err.Description
Resume Exit_gotosw_Click
DoCmd.SelectObject acForm, Switchboard
End Sub

Thanks for your collective assistance.

Andy
 
K

Klatuu

fredg's code is a much better approach. You should try to implement that
solution. If you need help with it, post back.
 

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