Results 1 to 12 of 12
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Arlington, Texas, USA
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Splash SCreen (Access 2000)

    I am trying to have a Splash screen open when this database opens, then wait 5 seconds and then open the Switchboard screen, and close the Splash screen. This function is called by the AutoExec macro. The problem I am having is I only get the border of the Splash screen, and after the 5 seconds, the border disappears and the Switchboard screen apprears. That only occurs while the Do While ... Loop command is running in code. If I don't use those two lines of code both screens come up fine. Any ideas??
    Thanks shihalud

    Option Compare Database
    Option Explicit

    'Opens splash screen waits 5 seconds and opens switchboard

    Function AutoExec()

    DoCmd.OpenForm "frmSplash"

    Dim lngPauseTime As Long
    Dim lngStartTime As Long
    lngPauseTime = 5
    lngStartTime = Timer
    Do While Timer < lngStartTime + lngPauseTime
    Loop

    DoCmd.Close acForm, "frmSplash"
    DoCmd.OpenForm "frmSwitchboard"
    End Function

  2. #2
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Splash SCreen (Access 2000)

    A better way would be to use the timer event of the form.

    Your AutoExec macro would open the Splash screen as a dialog box, which means the code would stop executing until the form is hidden or closed.

    You do that like this:

    DoCmd.OpenForm "frmSplash", , , , , acDialog

    In the Timer event of the Splash screen, put:

    DoCmd.Close acForm, Me.Name

    and set the Timer Interval of the splash screen to 5000 (milliseconds)

    What will happen is that the form will open as a dialog, wait 5 seconds and then close.
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  3. #3
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Splash SCreen (Access 2000)

    Along the same lines of Bryan's advice, here's a post that has a great example of a splash screen: <post#=51710>post 51710</post#>
    (The same form can also function as an "About" dialog)

    Hope this helps!

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Splash SCreen (Access 2000)

    It seems to me the preferred method for doing this sort of thing is to let the startup options start the splash screen, and when it get focus run the time code from that event rather than running it from the Autoexec macro. Once you put Access into the Do While Loop, it has a hard time trying to update the screen, but if you wait till the form is fully painted, it isn't a problem.
    Wendell

  5. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Splash SCreen (Access 2000)

    Try putting a DoEvents inside the Do loop.
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  6. #6
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Splash SCreen (Access 2000)

    IMHO 5 seconds is too long for a splash screen - 2 is about right. Users will get the impression that your app is slow just because the splash screen hangs about! Users XPect their apps to load quickly nowadays. <img src=/S/wink.gif border=0 alt=wink width=15 height=15>

    Certainly you should use the timer event for controlling your splash screen (I would also use the status bar to pass messages as well)
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

  7. #7
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Arlington, Texas, USA
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Splash SCreen (Access 2000)

    Thanks to everyone who replied to my post. I wound up using the Timer event in the properties screen as recommended and did lower it to two seconds.

    Thanks - shihalud

  8. #8
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Splash SCreen (Access 2000)

    One more thing I add to ALL my splash screens is that when the form (or anything on the form) is clicked, the timer event fires.

    If there is one thing that frustrates me is waiting for splash screens that I can't get rid of. Even if they are my own <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  9. #9
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Splash SCreen (Access 2000)

    I do the same thing.
    Charlotte

  10. #10
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Splash SCreen (Access 2000)

    <img src=/S/woops.gif border=0 alt=woops width=58 height=36> A bounder and unbounder agreeing!! Who'd a thunk it <img src=/S/evilgrin.gif border=0 alt=evilgrin width=15 height=15>
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  11. #11
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Splash SCreen (Access 2000)

    Since splash screens are typically unbound, what does that have to do with anything? <img src=/S/grin.gif border=0 alt=grin width=15 height=15> Now don't <img src=/S/pirate.gif border=0 alt=pirate width=22 height=18> this thread too, Bryan. <img src=/S/flee.gif border=0 alt=flee width=25 height=25>
    Charlotte

  12. #12
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Splash SCreen (Access 2000)

    I thought you were a Fence Bounder! <img src=/S/pun.gif border=0 alt=pun width=22 height=18>
    Wendell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •