Results 1 to 6 of 6
  1. #1
    matry is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2019
    Posts
    4

    Database access window size

    How to use VBA or macros to set the size of the access database window and possibly its location on the desktop?

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,570
    Non comprende. Lo siento.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    matry is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2019
    Posts
    4
    :-) sorry

    How to use VBA or macros to set the size of the access database window and possibly its location on the desktop?

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,570
    Do not know TBH.
    You can maximise and restore
    https://www.youtube.com/watch?v=S2tMFJ0x-5E

    I *think* would need a windows API for that as it is just a window, but that is just a guess.

    Perhaps not?

    https://learn.microsoft.com/en-us/of....window.resize

    Found via ....

    https://www.google.com/search?q=vba+...t=gws-wiz-serp

    Edit: Access does not have an ActiveWindow property?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    matry is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2019
    Posts
    4
    After some time I came back to the problem, surprisingly after a short haggling I managed to get a satisfactory result from chatGPT :-)
    Code:
    Private Declare PtrSafe Function MoveWindow Lib "user32" (ByVal hwnd As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long
    
    Private Sub Details_Click()
      Dim hwndAccess As Long
         hwndAccess = Application.hWndAccessApp
         MoveWindow hwndAccess, 10, 10, 1000, 1000, True
    End Sub

  6. #6
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,425
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Table/Query window size too big
    By csdlman in forum Access
    Replies: 15
    Last Post: 03-27-2021, 10:29 AM
  2. Replies: 4
    Last Post: 05-31-2018, 12:16 PM
  3. Report Window Size
    By JHart2016 in forum Access
    Replies: 8
    Last Post: 01-09-2017, 10:14 PM
  4. Size of Access Window set to Fom size
    By MrDummy in forum Access
    Replies: 2
    Last Post: 06-26-2016, 05:18 AM
  5. Set IE window size using followhyperlink
    By AndrewAfresh in forum Access
    Replies: 0
    Last Post: 11-23-2006, 12:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums