Splash Screen Woes...

sdp_tws

Registered User.
Local time
Today, 01:52
Joined
Apr 29, 2009
Messages
28
Hi all, I hope somebody can point out my vba errors.

What I am trying to achieve is to have a full-screen splash screen open when the databse is opened. This is to be displayed for 10 seconds.

In the meantime, 3 other forms are to be loaded in the background. When the 10 seconds is up, the splash screen disappears revealing the form which i loaded last.

It sounds simple enough, and the method I went for was this:

1 - set splash screen (frm_top) as the form to open on.
2 - maximise screen
3 - repaint screen
4 - turn echo OFF to prevent Access updating the screen, in theory leaving the splash screen displayed.
5 - open up the necessary forms
6 - close the splash screen (echo still off so user shouldn't see this close yet)
7 - wait 10 seconds
8 - turn echo back on, so in theory the user only now sees the splash disappear revealing the frm_DeliverySchedule form.

At least that's the theory. In practise, Access DOES change the screen, even with echo off. So the user gets to stare at a messy looking half-redrawn form whilst they wait 10 seconds. Why is this and what am I doing wrong?

My code looks like this:

Code:
Private Sub Form_Load()
      
    DoCmd.Maximize                         ' make full screen
    
    Me.Repaint    'repaint the screen

    Application.Echo False

    DoCmd.OpenForm "settings_general", , , , , acHidden          ' to keep a persistent connection open
    DoCmd.OpenForm "frm_PackagingIn"
    DoCmd.OpenForm "frm_CCP1"
    DoCmd.OpenForm "frm_DeliverySchedule"
    DoCmd.Close acForm, "frm_top"
            
    StartTime = Now

    Do Until TimePassed > 10
        FinishTime = Now
        TimePassed = DateDiff("s", StartTime, FinishTime)
    Loop

    Application.Echo True

End Sub
 
try adding

DoEvents

just after the Repaint command.
 
Hi,

you could look at my application :) a process could be-

run splash screen,
open forms hidden,
when the final form opens, unhide the other forms.

here is a dl link
http://tinyurl.com/6wdebks

Video link will be added today, tech issues..... mainly, me lol!



Cheers

Nigel
 
Last edited:

Users who are viewing this thread

Back
Top Bottom