Results 1 to 6 of 6
  1. #1
    Luki117 is offline Novice
    Windows 11 Access 2021
    Join Date
    Apr 2025
    Posts
    4

    Reset Form Position

    Hello,

    I'm Lukas from Germany and i'm new here.


    I have a problem wich has been bothering me for a long time:
    I have a database with a main form wich is declered as PopUp. While loading i enlarge it with "DoCmd.Maximize"

    When i work with it, i always also has to work with other software. When i turn back to the form via clicking the Access symbol in the taskbar, the form is always shifted to a other position, so i cant work with it longer. I have to restart the database.... The form is movable, but only at the upper bar, but this isn't visible in this case.

    Any idea?

  2. #2
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    There are several possible solutions.
    For example, you could try centering the form or use DoCmd.MoveSize code in e.g. the Form_Activate event

    It is also possible to drag a borderless form using code. See the Drag Form item in my example app: Control Application Interface
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  3. #3
    Luki117 is offline Novice
    Windows 11 Access 2021
    Join Date
    Apr 2025
    Posts
    4
    Quote Originally Posted by isladogs View Post
    There are several possible solutions.
    For example, you could try centering the form or use DoCmd.MoveSize code in e.g. the Form_Activate event

    It is also possible to drag a borderless form using code. See the Drag Form item in my example app: Control Application Interface
    Thanks, but the Fom_Activate command (and i believe any other access command) is not triggered by clicking the Access symbol in the task bar.
    Dont know how to center the form or how to drag a borderless by using code?

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Post 3 was moderated, I'm posting to trigger email notifications.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Quote Originally Posted by Luki117 View Post
    Thanks, but the Fom_Activate command (and i believe any other access command) is not triggered by clicking the Access symbol in the task bar.
    Dont know how to center the form or how to drag a borderless by using code?
    Whilst it doesn't happen automatically, you can trigger such code if clicking the icon causes the form to regain focus.

    As already stated, my Control Application Interface article & example app demonstrates how you can drag a borderless form using code. Did you look at the article / example app in my link?

    You can centre a form horizontally by setting Auto Center = "Yes" in the form property sheet.
    Or you can do so both horizontally & vertically by using code. I have several different code examples in another article: Centre Form On Screen
    For more precise control, to a specific location / size, use DoCmd.MoveSize code e.g. DoCmd.MoveSize 500, 1000, 10000, 8000 where all numbers are in TWIPS (1440 twips = 1 inch)
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  6. #6
    Luki117 is offline Novice
    Windows 11 Access 2021
    Join Date
    Apr 2025
    Posts
    4
    The centering works for me. When i turn back from other programs its smaller but centered in the middle. So i can reach all other command buttons. Thanks a lot!

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

Similar Threads

  1. Reset Position of Controls in Design View
    By ItsRoland in forum Access
    Replies: 5
    Last Post: 07-20-2018, 01:54 PM
  2. Replies: 10
    Last Post: 02-26-2016, 03:19 PM
  3. Replies: 2
    Last Post: 03-12-2014, 01:31 AM
  4. Replies: 8
    Last Post: 05-10-2012, 10:57 AM
  5. Reset imageBox on a form?
    By bosve73 in forum Forms
    Replies: 0
    Last Post: 08-11-2010, 07:16 AM

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