Results 1 to 4 of 4
  1. #1
    Fredrik831 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2012
    Location
    Sweden
    Posts
    14

    Open form as dialog box and in specified position

    Hi!



    I'm trying to open a form as a dialog box on a specified event, and then I would like the dialog to open at the center of the screen.

    I have managed to succesfully open the dialog, but it always open in the topleft corner.

    Here's my code:

    Private Sub Bild11_Click()
    DoCmd.OpenForm "in_ut_storre_bild", , , , , acDialog
    End Sub

    Thanks in advance!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Have you looked at the [AutoCenter] property of the form? How about using MoveSize in the OnLoad event of the form?

  3. #3
    Fredrik831 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2012
    Location
    Sweden
    Posts
    14
    That solved it!

    Thank you!

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You're welcome. Glad we could help.

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

Similar Threads

  1. Replies: 8
    Last Post: 05-10-2012, 10:57 AM
  2. Scroll bar position in main form
    By VictoriaAlbert in forum Forms
    Replies: 1
    Last Post: 10-25-2011, 04:24 PM
  3. Form doesn't open in Dialog mode
    By accessnewb in forum Programming
    Replies: 3
    Last Post: 08-02-2011, 08:38 AM
  4. Set Form Position
    By Yance in forum Programming
    Replies: 3
    Last Post: 11-29-2010, 02:20 PM
  5. Dialog box form example
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 08-30-2010, 10:45 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