Share via

Programmatically sizing and positioning Access Database Window?

Anonymous
2010-10-08T21:52:37+00:00

Can anyone tell me how to programmatically size and position the Access Database Window?  I'm referring to the object in this image, inside the red rectangle

I have seen a few articles and downloads that show how to size and position the Access Application window, as well forms, but nothing showing how to size and position the object in the picture.  Please explain if you know how or point me to any articles or sample apps that show how to do it.  Thank you

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

6 answers

Sort by: Most helpful
  1. Anonymous
    2010-10-08T21:59:38+00:00

    A.Stanton wrote:

    Can anyone tell me how to programmatically size and position the

    Access Database Window? I'm referring to the object in this image,

    inside the red rectangle 

    <http://img258.imageshack.us/img258/5764/clip1.jpg>

    I have seen a few articles and downloads that show how to size and

    position the Access Application window, as well forms, but nothing

    showing how to size and position the object in the picture. Please

    explain if you know how or point me to any articles or sample apps

    that show how to do it. Thank you   

    e.g.

    'set the focus to the database window by pretending to select a table

    DoCmd.SelectObject acTable, , True

    'use MoveSize to set position and size of the db window

    DoCmd.MoveSize 500, 500, 3000, 3000


    cu

    Karl

    *******

    Access-FAQ (German/Italian): http://www.donkarl.com

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2010-10-09T09:37:57+00:00

    A.Stanton wrote:

    I just meant suppose the current selection is like in this image:

    <http://img408.imageshack.us/img408/3749/clip1j.jpg>

    Any way to get back to this after running your code? I'm guessing

    not but thought I'd ask.

    Hmm, the first line of code i've posted

    DoCmd.SelectObject acTable, , True

    is ment to set the focus to the database window.

    If you are already there as in your picture, you don't need this line

    but only the other one with MoveSize.


    cu

    Karl

    *******

    Access-FAQ (German/Italian): http://www.donkarl.com

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2010-10-08T23:51:29+00:00

    I just meant suppose the current selection is like in this image:

    Any way to get back to this after running your code?  I'm guessing not but thought I'd ask.  Thank you

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2010-10-08T22:43:35+00:00

    A.Stanton wrote:

    Thank you Karl. Know a way to detect where I was when I issue those

    commands? So that I can return to tab I was on? Otherwise, no

    sweat, it works great. 

    I'm not sure what you mean with "return to tab I was on".

    In a form or report module you can always use

    Me.Name

    to detect the object's name. Other methods are e.g.

    • CurrentObjectType and CurrentObjectName
    • Screen.ActiveForm or Screen.ActiveForm.Name
    • Screen.ActiveControl or Screen.ActiveControl.Name

    cu

    Karl

    *******

    Access-FAQ (German/Italian): http://www.donkarl.com

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2010-10-08T22:26:04+00:00

    Thank you Karl.  Know a way to detect where I was when I issue those commands?  So that I can return to tab I was on?  Otherwise, no sweat, it works great.

    Was this answer helpful?

    0 comments No comments