Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2004
    Posts
    8

    Cool Unanswered: Minimize database window on startup?

    Hello -

    This is my first time in this forum - really impressed so far!!

    I need to find out how to minimize the database window on startup - I know you can go into Tools-->Startup--> and check the box to have it not appear at startup.

    However, when I use this option, it doesn't appear at all. I need to have access to it, so I just want it to minimize right from the start and bring up my Switchboard (which I've already done).

    SO, when I startup, I want the databse window to automatically MINIMIZE (not go away), and then have my Switchboard open up.

    THANK YOU!!!

  2. #2
    Join Date
    Aug 2004
    Location
    Cary, NC
    Posts
    264
    One option that you have is to do what you said and uncheck it in the startup. You could then provide a button for the user to show the window again if needed:

    Code:
     DoCmd.SelectObject acTable, , True
    And if they wanted to hide the window after showing it

    Code:
     DoCmd.SelectObject acTable, , True
    DoCmd.RunCommand acCmdWindowHide

    Steve

  3. #3
    Join Date
    Aug 2004
    Posts
    8

    Thanks, but..

    unfortunately, I'm not that good with VB; I know how to do a few things, but I really wouldn't have any idea where to put that code. I know, I really need to learn how! But, thanks for taking the time to reply.

    My interest in minimizing the database window comes from having seen it on some of the canned databases on the microsoft site. I downloaded a home inventory database from: http://office.microsoft.com/template...ntory&Scope=TC

    I noticed the database window in their template did this (minimzes automatically), but I'm not smart enough to figure out how they did it. I thought it was a macro, maybe an AutoExec thing, but it looks like it wasn't.

    Any further help would be appreciated. Thanks!!!!

  4. #4
    Join Date
    Aug 2004
    Location
    Cary, NC
    Posts
    264
    The easiest way to get what you want is to allow the database window to be hidden at startup and then when you want it, press the F11 key. Just make sure to leave "use access special keys" option checked in the startup options, it is under advanced and checked is the default.

    Any other method is going to involve some kind of coding. If the F11 option won't work, just respond again

    Steve

  5. #5
    Join Date
    Aug 2004
    Posts
    8

    Here's the solution:

    Thank you for helping me. I've been digging around in the code of the access template I found on microsoft's site, and I found the code, and where it goes.

    For anyone else wondering how to do this, the code is as follows (select Form as the object, and Open as the procedure in VBA, then paste the code in):


    Private Sub Form_Open(Cancel As Integer)
    ' Minimize the database window and initialize the form.

    On Error GoTo Form_Open_Err

    ' Minimize the database window.
    DoCmd.SelectObject acForm, "Switchboard", True
    DoCmd.Minimize

    ' Move to the switchboard page that is marked as the default.
    Me.Filter = "[ItemNumber] = 0 AND [Argument] = 'Default' "
    Me.FilterOn = True

    Form_Open_Exit:
    Exit Sub

    Form_Open_Err:
    MsgBox Err.Description
    Resume Form_Open_Exit

    End Sub

Posting Permissions

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