Results 1 to 12 of 12
  1. #1
    5 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, USA
    Posts
    908
    Thanks
    155
    Thanked 11 Times in 10 Posts

    Size and Position

    I have a small Access database application that works best when the main Access window is restored to a certain size and centered on the screen, and when frmMain is restored to a size a bit larger than the main window and also centered on the screen. There is a command button on frmMain that closes them both.

    That lets me work with frmMain when I open the database, and lets me access the main window when I (seldom) need to resize it and work on it.

    It all plays very nicely, except when I work in the main window or do something else that changes my nice little screen arrangement. It also gets upset when I work in another database and change the size of the Access windows. I'm not real sure how all this stuff interrelates.

    I'd like to have my preferred arrangement appear whenever I start this particular database. My Access skills are rusty and out of date, but I think this can be done with an Autoexec macro that places and sizes the two windows whenever the database is opened. Maybe I also want a command button on frmMain that restores and positions the main window.

    I need some guidance as to how to go about this.
    Last edited by Lou Sander; 2017-04-11 at 15:25.
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,469
    Thanks
    1
    Thanked 40 Times in 39 Posts
    When you say the main Access window, are you referring to the database window where you can select forms, queries, etc? That should stay wherever you position it.

    As for frmMain, make sure you don't have it set to auto-center. While it is open, click the save button; this should save it in the current position.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    5 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, USA
    Posts
    908
    Thanks
    155
    Thanked 11 Times in 10 Posts
    Yes, I am referring to the database window. I didn't really know what to call it.

    When I'm in a different database, I typically maximize it or change its size. I'm hoping to find a way to size it and put it where I want it when I open the "Contacts" database.

    I can deal with frmMain later.
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

  4. #4
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,469
    Thanks
    1
    Thanked 40 Times in 39 Posts
    I don't think there is a way to position the db window via code. What version of Access are you using? Newer versions it is on left of screen, and you can't move it at all.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  5. #5
    5 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, USA
    Posts
    908
    Thanks
    155
    Thanked 11 Times in 10 Posts
    I was afraid of that. I'm using Access 2010, and I looked in vain for ways to hide or resize the database window.
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

  6. #6
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,650
    Thanks
    3
    Thanked 65 Times in 64 Posts
    By "database window" are you referring to the application window for Access? If so, that behaves the same as other application windows. If the windows is maximized on your monitor, it opens up that way the next time. If it is restored, and thus sizeable, and you close it, it will open in the same size and position that it was closed.

    If on the other hand you are referring to what used to be called the database "window" in Access 2 through 2003, that was replaced by the "Navigation Pane" from 2007 to the current 2016, and it cannot be moved around, but it can be hidden. To hide it, got to File/Options and choose Current Database. Under the main Navigation heading, and unclick the check mark for Display Navigtion Pane. You can also "minimize" it by clicking the << symbol in the upper right corner, and it collapses against the left side of the Access window. Hope that helps.
    Wendell

  7. #7
    5 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, USA
    Posts
    908
    Thanks
    155
    Thanked 11 Times in 10 Posts
    This is the window I'm talking about:

    AccessScreen.JPG

    I think it is commonly termed the "Application Window".

    I was hoping to resize it through a macro or VBA code, so that whenever I open this application, the Application Window is either not on the screen or is made small and positioned behind frmMain, shown here (actually named frmContactDetails):

    frmMain.JPG

    I've accepted the idea that this cannot be done, except manually, but I'm still hoping that there's a way to do it.
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

  8. #8
    3 Star Lounger HiTechCoach's Avatar
    Join Date
    Sep 2011
    Location
    Oklahoma City, OK
    Posts
    247
    Thanks
    0
    Thanked 37 Times in 36 Posts
    What you show in the first image is called the Navigation Pane.

    There is a setting in the Access options displaying the Navigation Pane at start up.

    File > Options > Current Database > Navigation > Display Navigation Pane

    If you uncheck the setting then the Navigation Pane will be hiding at start up. To see it again you can press the shortcut key F11.

    TIP: F11 is used to toggle the Navigation Pane between expanded and collapsed

    You might also experiment with your database in Runtime mode. You do this by changing the extension from .accdb/.accde to .accdr.
    Last edited by HiTechCoach; 2017-04-17 at 12:06.
    Boyd Trimmell aka HiTechCoach (Access Information here)
    Microsoft MVP - Access Expert
    "If technology doesn't work for people, then it doesn't work."

  9. #9
    5 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, USA
    Posts
    908
    Thanks
    155
    Thanked 11 Times in 10 Posts
    The Navigation Pane is just the area marked with the red arrow. It behaves as you describe.

    AccessScreen.JPG

    I'm interested in hiding or resizing the whole window. Runtime mode seems to have some possibilities, but explanations of it are elusive.

    In response to "runtime mode", the Access Help feature (F1) talks about a Package Solution Wizard, but doesn't say much about what it does with respect to the main database window (or whatever it is called -- the whole window in the image above).

    Access 2010 Inside Out has an index entry on runtime mode, but it refers me to pages 1724-1727. The book only has 1440 pages, though. I suspect it might refer to the "four bonus chapters" that are on the CD that comes with the book. I'll look.
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

  10. #10
    3 Star Lounger HiTechCoach's Avatar
    Join Date
    Sep 2011
    Location
    Oklahoma City, OK
    Posts
    247
    Thanks
    0
    Thanked 37 Times in 36 Posts
    I have experimented in the past with hiding the Access Application Window. Stating with Access 2007 and the new tab document interface, hiding the Access Application Windows has many drawbacks. The biggy for me was Print Preview was very difficult. Just now worth the effort.


    Since you are able to position everything the way you want manually then you should able able to use VBA code to do the same thing. You can use API codes to resize the Access Application window. You can use the MoveSize to position Access's child (MDI) Windows.

    First, Is you database set to use Overlapping or Tabbed Windows?
    Boyd Trimmell aka HiTechCoach (Access Information here)
    Microsoft MVP - Access Expert
    "If technology doesn't work for people, then it doesn't work."

  11. #11
    5 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, USA
    Posts
    908
    Thanks
    155
    Thanked 11 Times in 10 Posts
    The database is set for Tabbed Windows, but it's nothing that I've experimented with.

    I've wondered about VBA. At one time I had some skills with it.

    My application is a Rolodex-like directory. I want the main form to come up so I can use it, then close the whole thing with one click. I've got a command button to close the whole thing. I'm starting to think that bothering with VBA and the Access Application Window would be more trouble than it's worth.

    I can totally forget about it if I just set the main form to appear maximized instead of carefully sized as it is now. I don't NEED the whole screen for it, but there's nothing wrong with USING the whole screen. Maybe I could just put a pretty picture into the unused area.
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

  12. #12
    3 Star Lounger HiTechCoach's Avatar
    Join Date
    Sep 2011
    Location
    Oklahoma City, OK
    Posts
    247
    Thanks
    0
    Thanked 37 Times in 36 Posts
    If you are using a tabbed documents and the form is NOT set as pop-up then the form should display within the Access's Application Window under the document tabs.

    Try setting the form's property for pop-up to No and Modal to No.

    If you can keep the form within the Access Application Window then it will probably be much easier to get what you want.
    Boyd Trimmell aka HiTechCoach (Access Information here)
    Microsoft MVP - Access Expert
    "If technology doesn't work for people, then it doesn't work."

Posting Permissions

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