code execution after form is displayed

nathansav

Registered User.
Local time
Today, 04:37
Joined
Jul 28, 2010
Messages
114
Hi,

I have created a splash screen for my database, and want to run some code once the splash has been displayed. The code, simply checks for the users registration on the database, and if they are not, points them in the right direction. If they are, the main menu opens, if not a warning text box.

How can i get this to happen, have tried Load, Open, Activate, Current, but they all execute then display the form.

THanks.
 
What about the timer event?

You could set the timer to however long you want the delay to be and put the code in the timer event.
 
Just thought of the timer, have set up a 1.5sec delay.
Thanks
 
Hi,

I have created a splash screen for my database, and want to run some code once the splash has been displayed. The code, simply checks for the users registration on the database, and if they are not, points them in the right direction. If they are, the main menu opens, if not a warning text box.

How can i get this to happen, have tried Load, Open, Activate, Current, but they all execute then display the form.

THanks.

Like the sounds of a custom splash screen onload. How do you do one of them?

Also how do you get users and for them to log in with passwords?
Infact I wil lcreate a thread
 
I would expect his splash screen is just a form which is set to load in the startup options / autoexec macro. The timer properties would then allow you to leave is displayed for as long as you want before closing it and taking some action (i.e. opening the main switchboard).

As for database security, I will leave you to make a thread about that. :)
 
Hi,

I have created a splash screen for my database, and want to run some code once the splash has been displayed. The code, simply checks for the users registration on the database, and if they are not, points them in the right direction. If they are, the main menu opens, if not a warning text box.

How can i get this to happen, have tried Load, Open, Activate, Current, but they all execute then display the form.

THanks.

hI, I have a frmSplashscreen with a checkbox (chkShowHide and a Label Close, when box checked the form doesn't show anymore and code execution is in the On Close event..

Hope this might help.

Code:
Private Sub Form_Open(Cancel As Integer)

    On Error GoTo FormOpen_Err
    If (CurrentDb().Properties("StartupForm") = "frmSplashScreen" Or _
      CurrentDb().Properties("StartupForm") = "Form.frmSplashScreen") _
        Then
        Forms!frmSplashScreen!chkHideSplash = False
    Else
        Forms!frmSplashScreen!chkShowHide = True
    End If
FormOpen_Exit:
    Exit Sub

FormOpen_Err:
    If Err = 3270 Then
        Forms!frmSplashScreen!chkShowHide = True
        Resume FormOpen_Exit
    End If

End Sub

'----------------------------------------------------------------

Private Sub Form_Close()

On Error GoTo Form_Close_Err
    If Forms!frmSplashScreen!chkShowHide Then
        CurrentDb().Properties("StartupForm") = "Touchscreen"
    Else
        CurrentDb().Properties("StartupForm") = "frmSplashScreen"
    End If
Exit Sub
 

Users who are viewing this thread

Back
Top Bottom