Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2004
    Location
    Inverurie
    Posts
    628

    Unanswered: display a form for a defined period of time.

    Hi all,

    I need a bit of help with this.

    When a user completes the login form and clicks login, the check process gets carried out. If the details entered are correct, i want to close the login form, and open the splash screen (straight forward enough) for a specific amount of time before the main interface screen opens up.

    I am having trouble figuring out the coding needed to display the form for a set time period. If someone could suggest a method to use that can do this, i would be really grateful.

    Thanks.

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Enable the timer for the form ... And then set the time interval ... In the Form_Timer event kill the form (a.k.a DoCmd.Close) ...
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Jul 2004
    Location
    Inverurie
    Posts
    628
    ok, how do you do that?

    I have never done this kind of thing before, so i apologise if i come out with any stupid sounding comments or questions.

  4. #4
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    Design the Splash Screen then get to the code behind the form using View/Code then add the following:

    Code:
    Private Sub Form_Open(Cancel As Integer)
    
        Me.TimerInterval = 100
        
    End Sub
    
    Private Sub Form_Timer()
    
        DoCmd.Close acForm, Me.Name
        
    End Sub
    The '100' stands for milliseconds so 30 seconds would be 30000.

  5. #5
    Join Date
    Jul 2004
    Location
    Inverurie
    Posts
    628
    Thanks DCKunkle, that worked, but i had to do a little change to the code:

    Code:
    Private Sub Form_Open(Cancel As Integer)
    
        Me.TimerInterval = 100
        
    End Sub
    
    Private Sub Form_Timer()
    
        DoCmd.Close
        DoCmd.OpenForm "main"
        
    End Sub

Posting Permissions

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