Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2017
    Posts
    2
    Provided Answers: 1

    Unhappy Answered: Access 2010 Really strange SubForm positioning issue?

    Hi All,

    I have been having a LOT of trouble figuring this one out so I thought I would turn to the experts here

    When I try to set focus to the first Control (TextBox) on the SubForm using the following code, the SubForm positioning changes no matter what I do. Previously it took over the whole form (as in the 2nd screenshot), then when I tried changing "Top" in the Properties for the SubForm Control on the Main Form, it changed to what you can see in the first screenshot. But I haven't been able to get anywhere at all from there, and I've tried EVERYTHING.

    Code:
    [Forms]![frmINVOICEENTRY]![sfrmINVOICEENTRY1].SetFocus
    [Forms]![frmINVOICEENTRY]![sfrmINVOICEENTRY1]![STOCKCODE].SetFocus

    A sample of the relevant part of the DB is attached.


    Click image for larger version. 

Name:	1.PNG 
Views:	0 
Size:	28.2 KB 
ID:	17371

    Click image for larger version. 

Name:	SetFocus to Subform 1.PNG 
Views:	0 
Size:	8.9 KB 
ID:	17372


    TestDB4 - Test Invoice & Subform.zip

  2. Best Answer
    Posted by techfixes

    "OK, no responses here, so I thought I would share the fix which I eventually figured out after much sweat and tears

    I had to constrain the dimensions of the Subform by placing the following at the bottom of the Form Load event for the main Form:


    Code:
    Me!sfrmINVOICEENTRY1.Height = 2510
    Me!sfrmINVOICEENTRY1.Width = 12220

    I adjusted the numbers down until the Form did not jump at all. This definitely fixed it."


  3. #2
    Join Date
    Jun 2017
    Posts
    2
    Provided Answers: 1

    Lightbulb

    OK, no responses here, so I thought I would share the fix which I eventually figured out after much sweat and tears

    I had to constrain the dimensions of the Subform by placing the following at the bottom of the Form Load event for the main Form:


    Code:
    Me!sfrmINVOICEENTRY1.Height = 2510
    Me!sfrmINVOICEENTRY1.Width = 12220

    I adjusted the numbers down until the Form did not jump at all. This definitely fixed it.
    Last edited by techfixes; 06-09-17 at 01:00.

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
  •