|
-
Sep 23rd, 2005, 09:13 AM
#1
Thread Starter
New Member
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:
Open .Form = "frmSplash"
Close .Form = "frmSplash"
And that doesn't even work lol!
Any help would be greatly appreciated!
Thanks in advance
Ben
-
Sep 23rd, 2005, 09:20 AM
#2
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.
-
Sep 23rd, 2005, 09:24 AM
#3
Re: Hello - newbie
Welcome to the forums Ben. 
 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!
-
Sep 23rd, 2005, 09:24 AM
#4
Re: Hello - newbie
w00t! I still have a future for me in VB6 programming.
-
Sep 23rd, 2005, 09:29 AM
#5
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"
-
Sep 23rd, 2005, 09:31 AM
#6
Thread Starter
New Member
Re: Hello - newbie
 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?
-
Sep 23rd, 2005, 09:38 AM
#7
Thread Starter
New Member
Re: Hello - newbie
 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
-
Sep 23rd, 2005, 09:39 AM
#8
Re: Hello - newbie
 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:
Private Sub Timer1_Timer()
Unload Me
frmMain.Show
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?)
-
Sep 23rd, 2005, 09:48 AM
#9
Thread Starter
New Member
Re: Hello - newbie
 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:
Private Sub Timer1_Timer()
Unload Me
frmMain.Show
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?
-
Sep 23rd, 2005, 09:51 AM
#10
Re: Hello - newbie
Moved to Office Development.
-
Sep 27th, 2005, 09:52 AM
#11
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|