Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SplashScreen not loading (AutoExec) - Newbie Q 1

Status
Not open for further replies.

Stevehewitt

IS-IT--Management
Joined
Jun 7, 2001
Messages
2,075
Location
GB
Hey.

I'm really new to access/sql but trying to get the hang of it. All is going well and I have nearly finished the program, but I can't get this splash screen to work. I have used to following script:

Option Compare Database
Option Explicit

'Opens splashscreen for 5 seconds, closes, then opens switchboard
Function AutoExec()
Dim lngPauseTime As Long
Dim lngStartTime As Long


DoCmd.OpenForm "frmSplash" 'Opens splashscreen
lngPauseTime = 5 'Sets delay time
lngStartTime = Timer 'Get current time
Do While Timer < lngStartTime + lngPauseTime 'Wait
Loop

DoCmd.OpenForm &quot;Switchboard&quot; 'Opens switchboard
DoCmd.Close acForm, &quot;frmSplash&quot; 'Close splash
End Function


I then saved it as a macro (autoexec). Restarted the apps and the second part of the module works, but no splash screen. The app does nothign for the first 5 secs, then loads up the switchboard. No sign of a splash screen!

Any ideas?

Many thanks in advance. Steve Hewitt
Systems Manager

Windows 2000 Microsoft Certified Professional (75 - 215)

 
Steve,

Try adding the following line immediately after the first Docmd.Openform line:

Forms!frmSplash.Repaint

This will force the form to &quot;repaint&quot; immediately. What seems to be happening is that Access is &quot;buffering&quot; the screen refreshing, and consequently you're not seeing the splash screen.

Hope this solves it for you,
Cheers,
Steve
 
Cheers Steve. Nice one. It worked a treat. Many thanks Steve Hewitt
Systems Manager

Windows 2000 Microsoft Certified Professional (75 - 215)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top