What am I missing??

Navyguy

Registered User.
Local time
Today, 15:48
Joined
Jan 21, 2004
Messages
194
I am playing around with splash screens and seem to missing something.

The splash screen opens great and so does the "Main Form" but when the "Main Form" opens the Splash stays on top and open. Also if I close the "Main Form" it opens up again after 5 seconds, like It would if the splash was just opened.

I searched around the forum and did not see anything specific to this example.

Here is the code that I am using.

Option Compare Database
Option Explicit

Private Sub Form_Timer()

DoCmd.Close acForm, "Frm-Splash"
DoCmd.OpenForm "Frm-Main Form"

End Sub

Thanks for your assistance

Navyguy
 
Code:
Private Sub Form_Load()

    Me.TimerInterval = 2000
    
End Sub
Code:
Private Sub Form_Timer()

    If Forms![Frm-Splash].TimerInterval <> 0 Then
    Forms![Frm-Splash].TimerInterval = 0
    End If
    DoCmd.Close
    DoCmd.OpenForm "Frm-Main Form"

End Sub

That shoud work, if you want to get creative start a mouse hourglass in the load, and end it in the timer :)

You may want to change your naming techniques.
________
Ford windsor engine picture
 
Last edited:
Code:
Private Sub Form_Timer()

    With DoCmd
        .Close acForm, Me.Name
        .OpenForm "Frm-Main Form"
    End With

End Sub


To a.sinatra - in this instance there's no need to set the TimerInterval (to 5000 for 5 seconds) property programmatically. It can simply be set as default on the form's property.
 
Thanks a.sinatra

At my level this is pretty exciting stuff, I will have to wait to I feel a little more comfortable with this stuff first before I start adding features like Hourglasses etc.

What are you suggesting regarding the naming techniques? Is there a particular "standard" that I should be using?

Navyguy
 
Thanks Mile

Very subtle differences in these codes, adding the word “with”. I guess I will eventually figure it all out. Now I am off to find out what “with” is all about!!!

I always get my questions answered but end up leaving with more to ask!!!

Navyguy
 
Do you mean...

If you are reffering to tables form etc.........I do the following:

tblMyTableName
frmMyFormName
qryMyQueryName etc.........

Create your form from queries...blah.....blah

I am quite new to it all myself. The 'purists' look for the perfect DB. As long as you normalize don't get to hung up on 'perfection'. If it works for your app.........

This forum is superb and has been of great help to myself, so keep posting those threads!!

:D
 

Users who are viewing this thread

Back
Top Bottom