Results 1 to 9 of 9
  1. #1
    bayners123 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Apr 2014
    Posts
    3

    Anchoring controls on a form reset on reopen


    I'm trying to get a subform to expand with its parent form, along with some other textboxes. I've been using the vertical / horizontal anchoring properties to do this and it works exactly how I want IF I make the settings in layout mode.

    However, if I make the changes in design mode and then switch to layout/form mode OR if I save, close and reopen the form then the anchoring settings have reset back to top/left.

    It's very frustrating because I'm pretty sure I've done the right thing as it all works fine until I save and reopen. Has anyone else experienced this and does anyone know of a solution?

    Thanks, I'm posting here for the first time because I've googled for hours to no avail!

  2. #2
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Maybe? When you close the form

    use AcCloseSave

    docmd.close ,"yourformname"
    AcCloseSave

  3. #3
    bayners123 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Apr 2014
    Posts
    3
    Quote Originally Posted by Ruegen View Post
    Maybe? When you close the form

    use AcCloseSave

    docmd.close ,"yourformname"
    AcCloseSave
    Thanks for the suggestion Ruegen, I'll give it a try. Surely that's just the same as closing it from the GUI though isn't it?

  4. #4
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    I believe it saves the form in its state - where when close it normally - it does not.

  5. #5
    bayners123 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Apr 2014
    Posts
    3
    Hmm nope doesn't seem to make any difference I'm afraid. I tried putting DoCmd.Save into the form_close event, saving manually before I quit but still it loads up without the anchoring settings.

  6. #6
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    did you add the line acSaveYes?

  7. #7
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I don't use Layout view but....

    Have you considered the Can Grow properties of the SubForm Control as well as the Form Object that is the Control Source of the Subform Container?

  8. #8
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by ItsMe View Post
    I don't use Layout view but....

    Have you considered the Can Grow properties of the SubForm Control as well as the Form Object that is the Control Source of the Subform Container?

    blinks* rubs eyes* I thought they were for reports only?

  9. #9
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I still design based on a set screen resolution so I do not really know. I just saw the property available in the subform...

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

Similar Threads

  1. Replies: 3
    Last Post: 04-09-2013, 01:35 PM
  2. Replies: 9
    Last Post: 03-20-2013, 11:41 AM
  3. Replies: 2
    Last Post: 11-20-2012, 03:00 PM
  4. If no matches Reopen form after Msgbox
    By LoveLearning in forum Access
    Replies: 2
    Last Post: 07-18-2012, 06:08 PM
  5. Reset imageBox on a form?
    By bosve73 in forum Forms
    Replies: 0
    Last Post: 08-11-2010, 07:16 AM

Tags for this Thread

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