Results 1 to 11 of 11

Thread: Hello - newbie

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2005
    Posts
    5

    Hello - newbie

    Hey, I'm Ben, a newbie on here.

    I am currently creating a database in Microsoft Access, but have forgotten all of the VB i learned at school so if anyone on here could help me with a few simple bits of script i would be most grateful!

    I have a form (frmSplash) which i would like to use as a splash screen upon starting the database. How would i open the form, make it wait for 5 seconds and then close the form?

    So far I have managed this (not very impressive i know )

    VB Code:
    1. Open .Form = "frmSplash"
    2.  
    3. Close .Form = "frmSplash"

    And that doesn't even work lol!

    Any help would be greatly appreciated!

    Thanks in advance

    Ben

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Hello - newbie

    Set your frmSplash as the startup object. Place a timer on your splash form, with an interval of 5 seconds. In the Timer's tick event, open your other form, and unload me.


    I hope that's right, I haven't used vb6 in a long time.

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Hello - newbie

    Welcome to the forums Ben.

    Quote Originally Posted by mendhak
    Set your frmSplash as the startup object. Place a timer on your splash form, with an interval of 5 seconds. In the Timer's tick event, open your other form, and unload me.


    I hope that's right, I haven't used vb6 in a long time.
    Right on the money!

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Hello - newbie

    w00t! I still have a future for me in VB6 programming.

  5. #5
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Hello - newbie

    Timer? in access? not sure if Access has a timer control.. (At least I dont see one in mine Access2K)
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  6. #6

    Thread Starter
    New Member
    Join Date
    Sep 2005
    Posts
    5

    Re: Hello - newbie

    Quote Originally Posted by mendhak
    Set your frmSplash as the startup object. Place a timer on your splash form, with an interval of 5 seconds. In the Timer's tick event, open your other form, and unload me.


    I hope that's right, I haven't used vb6 in a long time.
    Thanks very much mate, makes sense. Now to show my total ignorance, how do i make the form a start object and set the time parameters?

  7. #7

    Thread Starter
    New Member
    Join Date
    Sep 2005
    Posts
    5

    Re: Hello - newbie

    Quote Originally Posted by [A51g]Static
    Timer? in access? not sure if Access has a timer control.. (At least I dont see one in mine Access2K)
    It is possible i did it in my a-level course work, its a really simple bit of code i'm sure, but i cant remember it and i can't find my A level course work

  8. #8
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Hello - newbie

    Quote Originally Posted by benlawton
    Thanks very much mate, makes sense. Now to show my total ignorance, how do i make the form a start object and set the time parameters?
    To set as startup object.

    From the VB IDE click Project/Properties

    From the Startup Object dropdown select frmSplash

    Place a timer control on your form. Set its interval to the desired number of milliseconds you wish frmSplash to be displayed. Place the following Code in the timer event
    VB Code:
    1. Private Sub Timer1_Timer()
    2. Unload Me
    3. frmMain.Show
    4. End Sub
    Where frmMain is the name of whatever your main project form is.

    (This has nothing to do with Access. Your first post said that you were creating the database in Access, but using VB. If you are using Access VBA, then practically nothing we have posted is going to work.

    Are you using VB or Access VBA?)

  9. #9

    Thread Starter
    New Member
    Join Date
    Sep 2005
    Posts
    5

    Re: Hello - newbie

    Quote Originally Posted by Hack
    To set as startup object.

    From the VB IDE click Project/Properties

    From the Startup Object dropdown select frmSplash

    Place a timer control on your form. Set its interval to the desired number of milliseconds you wish frmSplash to be displayed. Place the following Code in the timer event
    VB Code:
    1. Private Sub Timer1_Timer()
    2. Unload Me
    3. frmMain.Show
    4. End Sub
    Where frmMain is the name of whatever your main project form is.

    (This has nothing to do with Access. Your first post said that you were creating the database in Access, but using VB. If you are using Access VBA, then practically nothing we have posted is going to work.

    Are you using VB or Access VBA?)
    I am using VBA yes, sorry should have clarified that from the start. How do i make the sub open a form and close a form? I really have no idea what im doing lol

    Update : I have managed to make the form open for 5 seconds, how do i make the form open on startup?

  10. #10
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Hello - newbie

    Moved to Office Development.

  11. #11
    Frenzied Member DKenny's Avatar
    Join Date
    Sep 2005
    Location
    on the good ship oblivion..
    Posts
    1,171

    Re: Hello - newbie

    Create your form with the timer, picture, logo etc.

    Then in Access select the Tools\Starup menu. Under the "Display Form/Page:" title, select your splash screen.
    You can do some other good stuff here, like hiding the database window.
    Declan

    Don't forget to mark your Thread as resolved.
    Take a moment to rate posts that you think are helpful

Posting Permissions

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



Click Here to Expand Forum to Full Width