Results 1 to 14 of 14
  1. #1
    mulefeathers is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Oct 2009
    Posts
    39

    Closing 1 form and opening another

    How can close a welcome screen and open another form. I have tried use the Timer function but with little suscces.

    I used this code but it doesn't do anything:

    Private Sub Form_Timer()
    DoCmd.Close acForm, "splash"
    DoCmd.OpenForm "frmmain"
    End Sub

    Then I added this code:

    Me.TimerInterval = 10000

    Still nothing.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    It should work. Try Opening the frmMain *before* closing the Splash form with
    DoCmd.Close acForm, Me.Name, acSaveNo

  3. #3
    mulefeathers is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Oct 2009
    Posts
    39
    This is what I have but still nothing.

    Private Sub Form_Timer()
    Me.TimerInterval = 10000
    DoCmd.OpenForm "frmmain"
    DoCmd.Close acForm, Me.Name, acSaveNo
    End Sub

  4. #4
    JjJSeVdT is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2011
    Posts
    2
    Are you just trying to do this without a button? I usually use the welcome screen as an acknowledgement screen and set the button to close the form and open the new form.

  5. #5
    mulefeathers is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Oct 2009
    Posts
    39
    Yes just have it automated instead of a button.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    The Timer can do this operation successfully. Set your TimerInterval to 1000 so things happen faster for now and put in a MsgBox to make sure the event is firing.

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Are you still using ac2003 or have you moved on to a later version of Access. The later versions require a Trusted Location for code to work.

  8. #8
    mulefeathers is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Oct 2009
    Posts
    39
    The event is not firing. I used

    Private Sub Form_Timer()
    Me.TimerInterval = 1000
    MsgBox "test box"
    End Sub

  9. #9
    mulefeathers is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Oct 2009
    Posts
    39
    Access 2010

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Have you set your Trusted Location yet? http://www.btabdevelopment.com/ts/2010TL

  11. #11
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by mulefeathers View Post
    Access 2010
    32 or 64 bit?

  12. #12
    mulefeathers is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Oct 2009
    Posts
    39
    Quote Originally Posted by RuralGuy View Post
    32 or 64 bit?
    It is a 32 bit

  13. #13
    mulefeathers is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Oct 2009
    Posts
    39
    Quote Originally Posted by RuralGuy View Post
    Have you set your Trusted Location yet? http://www.btabdevelopment.com/ts/2010TL
    No i have not. All of the users will be using 2003. I think I'm going to install that version and try re-writing this database. 2010 was giving me some problems and it's been very weird today.

  14. #14
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    ac2010 can run ac2003 db's just fine. It is just that ac2010 requires the Trusted Location to enable code.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Closing a form automatically
    By accessnewb in forum Forms
    Replies: 27
    Last Post: 07-22-2011, 05:58 PM
  2. Closing a form through VBA
    By ghostmachine in forum Forms
    Replies: 4
    Last Post: 12-13-2010, 01:57 PM
  3. Closing and saving a form
    By Lxmanager in forum Forms
    Replies: 14
    Last Post: 11-21-2010, 02:04 AM
  4. Prevent a form from closing
    By ksmithson in forum Forms
    Replies: 0
    Last Post: 07-15-2010, 12:49 PM
  5. Closing a Form Problem
    By MuskokaMad in forum Forms
    Replies: 2
    Last Post: 03-18-2010, 05:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums