none
My initial load form won't stay hidden RRS feed

  • Question

  • In the Options dialog, under current database, I've set my display form to "frmLoadApplication". This form loads when the application is launched, all is well on that front.

    The problem is I can't get this thing to hide itself. It checks if connection to SQL Server can be established. If so it opens a login screen for user then it should hide. Otherwise it closes the application.

    I've set Me.Visible = False. Me.Form.Visible = False. in both load/open events of frmLoadApplication. It won't work. I would like this form to stay open but hidden so it can monitor and check things from time to time during the application instance lifespan.

    The only way I've gotten this to work was to set the MouseMove event. But it looks like a glitchy program because if it opens the Login screen it is behind the blank frmLoadApplication form until the mouse is moved, then the login screen shows up.

    Is there a way to hide this initial loading form and keep it running? Other solution I am thinking about is having frmLoadApplication just be a dummy form that loads another initialization form and closes itself without doing anything else and putting all my code in the second form.

    Anyone else have this problem?
    Friday, December 18, 2015 6:13 PM

Answers

  • Is there a way to hide this initial loading form and keep it running? Other solution I am thinking about is having frmLoadApplication just be a dummy form that loads another initialization form and closes itself without doing anything else and putting all my code in the second form.

    Anyone else have this problem?

    Hi HTHP,

    Finally a new thread that I can read!

    I took this last approach, using a Startup_form, that opens a second form and closes itself. The only difference is that this Startup_form does all necessary general initialization, such as synchronising the data definiton of the BE and relinking in case of first running a new application, and further set all the necessary globals.

    Imb.

    • Marked as answer by HTHP Monday, December 21, 2015 8:39 PM
    Friday, December 18, 2015 6:47 PM
  • I open a hidden form for monitoring on some of my applications. This is how I open it. You could use an AutoExec macro instead of choosing it as your startup form.

            strFormName = "frmInactiveShutDown"
            'check if frmInactiveShutDown is closed. If it is, open it.
            If SysCmd(acSysCmdGetObjectState, acForm, strFormName) = conObjStateClosed Then
                DoCmd.OpenForm strFormName, acNormal, , , , acHidden
            End If


    Bill Mosca
    www.thatlldoit.com
    http://tech.groups.yahoo.com/group/MS_Access_Professionals

    • Marked as answer by HTHP Monday, December 21, 2015 8:38 PM
    Friday, December 18, 2015 6:48 PM

All replies

  • Is there a way to hide this initial loading form and keep it running? Other solution I am thinking about is having frmLoadApplication just be a dummy form that loads another initialization form and closes itself without doing anything else and putting all my code in the second form.

    Anyone else have this problem?

    Hi HTHP,

    Finally a new thread that I can read!

    I took this last approach, using a Startup_form, that opens a second form and closes itself. The only difference is that this Startup_form does all necessary general initialization, such as synchronising the data definiton of the BE and relinking in case of first running a new application, and further set all the necessary globals.

    Imb.

    • Marked as answer by HTHP Monday, December 21, 2015 8:39 PM
    Friday, December 18, 2015 6:47 PM
  • Hi. If you don't need any user input for the form, try using a Timer event. Hope that helps...

    Friday, December 18, 2015 6:47 PM
  • I open a hidden form for monitoring on some of my applications. This is how I open it. You could use an AutoExec macro instead of choosing it as your startup form.

            strFormName = "frmInactiveShutDown"
            'check if frmInactiveShutDown is closed. If it is, open it.
            If SysCmd(acSysCmdGetObjectState, acForm, strFormName) = conObjStateClosed Then
                DoCmd.OpenForm strFormName, acNormal, , , , acHidden
            End If


    Bill Mosca
    www.thatlldoit.com
    http://tech.groups.yahoo.com/group/MS_Access_Professionals

    • Marked as answer by HTHP Monday, December 21, 2015 8:38 PM
    Friday, December 18, 2015 6:48 PM