Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2004
    Posts
    118

    Question Unanswered: Is there any way to make a form start up without showing the access window?

    Just wondering. Would be neat if there was an easy way of doing this without making it into an app.

  2. #2
    Join Date
    Oct 2003
    Location
    UK
    Posts
    5

    Database Window?

    Are you trying to stop the DB window from showing or the Access Application window?

    If you are trying to stop the db window from showing, then goto Menu : Tools -> Startup and deselect the show database window option.

    If you are trying to stop the Access application window from opening without comiling then I don't think you can do that...

  3. #3
    Join Date
    Mar 2004
    Posts
    118
    the latter....


    didnt think so

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Try the following:

    Copy and past that API in a Module

    'This API function can be used to completely hide
    'Access window and just show your form on the desktop.
    'Make the form popup and from it's Open Event, call the
    'HideAccess function with SW_HIDE as the argument.
    'Warning: If you're hiding the main Access window, make
    'sure your error handlers are good. Because with the
    'window hidden, if an error is raised, pressing "End"
    'on the Error window will NOT make Access window visible
    'and you will be left with just the form open. A
    'recommended method is to make a call to fSetAccessWindow
    'with SW_SHOWNORMAL from your error handlers.


    '************ Code Start **********

    Global Const SW_HIDE = 0
    Global Const SW_SHOWNORMAL = 1
    Global Const SW_SHOWMINIMIZED = 2
    Global Const SW_SHOWMAXIMIZED = 3

    Public Declare Function ShowWindow Lib "user32.dll" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long


    Public Sub HideAccess()
    Call ShowWindow(Access.hWndAccessApp, SW_HIDE)
    End Sub

    Public Sub ShowAccess()
    Call ShowWindow(Access.hWndAccessApp, SW_SHOWNORMAL)
    End Sub

    Public Sub ShowMaximized()
    Call ShowWindow(Access.hWndAccessApp, SW_SHOWMAXIMIZED)
    End Sub

    Public Sub ShowMinimized()
    Call ShowWindow(Access.hWndAccessApp, SW_SHOWMINIMIZED)
    End Sub

    Public Sub ShowNormal()
    Call ShowWindow(Access.hWndAccessApp, SW_SHOWNORMAL)
    End Sub

    In your Form_Open put the next Code

    Private Sub Form_Open(Cancel As Integer)
    Call HideAccess
    End Sub

  5. #5
    Join Date
    Mar 2004
    Posts
    118
    That just hides everything heheh.... I cant even open the file now.

  6. #6
    Join Date
    Mar 2004
    Location
    UK
    Posts
    30
    Originally posted by YevSnow
    That just hides everything heheh.... I cant even open the file now.
    If I read the code example right then you would need to make the form a PopUp enabled one. This would make it stay open with the database app window hidden.

  7. #7
    Join Date
    Mar 2004
    Posts
    118
    doh, you could be right! I'll give it a try

  8. #8
    Join Date
    Apr 2009
    Posts
    2

    Exclamation Omg!

    OK so I was trying this and now I cannot get into my file how do I undo what I just did!!!

  9. #9
    Join Date
    Apr 2009
    Posts
    2

    Angry Nevermind

    I created a new db and imported everything but the module... dumb!

Posting Permissions

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