Here is a routine I use for my splash forms. The open or viewing time of
the splash form is adjustable.
Creat a module called Splash and paste this into the module. Change the
names as required. In your Startup have the splash form decalred as the
starting form.
Hope this helps,
Henry
'******************************************************************
' MODULE NAME: Splash
' DECLARATION SECTION
'******************************************************************
Option Explicit
Dim gSplashStart ' The time when the splash screen opened.
Dim gSplashInterval ' The minimum time to leave the splash screen
' up.
Dim gSplashForm ' The name of the splash screen form.
'******************************************************************
' FUNCTION: SplashStart()
'
' PURPOSE: Used to invoke the splash screen form specified by the
' SplashForm argument.
'
' ARGUMENTS:
' SplashForm - The name of the form to use as the splash
' screen.
' SplashInterval - The minimum time, in seconds, that the splash
' screen must remain active on the screen.
'
'******************************************************************
Function SplashStart(ByVal SplashForm As String, ByVal _
SplashInterval As Integer)
' Open the splash form.
DoCmd.OpenForm SplashForm ' In Microsoft Access 97 and 7.0.
' Set the starting time.
gSplashStart = Timer
' Record the global information.
gSplashInterval = SplashInterval
gSplashForm = SplashForm
End Function
'******************************************************************
' FUNCTION: SplashEnd()
'
' PURPOSE: Used to close the splash screen form opened by the
' SplashStart() function. This function checks to ensure that
' the splash screen remains active until the user-specified
' interval has expired.
'
'******************************************************************
Function SplashEnd()
Dim RetVal
' Loop until the splash screen has been active for
' the desired interval.
Do Until Timer - gSplashStart > gSplashInterval
' Yield control so other applications can process.
RetVal = DoEvents()
Loop
' Close the splash screen.
DoCmd.Close acForm, gSplashForm ' In Microsoft Access 97 and 7.0.
End Function
'******************************************************************
' MODULE NAME: Splash
' DECLARATION SECTION
'******************************************************************
Option Explicit
Dim gSplashStart ' The time when the splash screen opened.
Dim gSplashInterval ' The minimum time to leave the splash screen
' up.
Dim gSplashForm ' The name of the splash screen form.
'******************************************************************
' FUNCTION: SplashStart()
'
' PURPOSE: Used to invoke the splash screen form specified by the
' SplashForm argument.
'
' ARGUMENTS:
' SplashForm - The name of the form to use as the splash
' screen.
' SplashInterval - The minimum time, in seconds, that the splash
' screen must remain active on the screen.
'
'******************************************************************
Function SplashStart(ByVal SplashForm As String, ByVal _
SplashInterval As Integer)
' Open the splash form.
DoCmd.OpenForm SplashForm ' In Microsoft Access 97 and 7.0.
' Set the starting time.
gSplashStart = Timer
' Record the global information.
gSplashInterval = SplashInterval
gSplashForm = SplashForm
End Function
'******************************************************************
' FUNCTION: SplashEnd()
'
' PURPOSE: Used to close the splash screen form opened by the
' SplashStart() function. This function checks to ensure that
' the splash screen remains active until the user-specified
' interval has expired.
'
'******************************************************************
Function SplashEnd()
Dim RetVal
' Loop until the splash screen has been active for
' the desired interval.
Do Until Timer - gSplashStart > gSplashInterval
' Yield control so other applications can process.
RetVal = DoEvents()
Loop
' Close the splash screen.
DoCmd.Close acForm, gSplashForm ' In Microsoft Access 97 and 7.0.
End Function