[AccessD] DoCmd.GotoControl shifts form?

Ryan W wrwehler at gmail.com
Fri Mar 24 12:08:40 CDT 2023


There's some sort of correlation between anchoring and using focusing on a
child subform (and then a control on that subform) to use
docmd.gotorecord,,acnewrec (in the case of add).

It also happens with Forms!FormName!SubFormControlName.setfocus....

If I tinker enough with the control sizes that anchor and stretch down I
can get it to stop dancing on me...

On Thu, Mar 23, 2023 at 2:42 PM Ryan W <wrwehler at gmail.com> wrote:

> Has anyone had experience with DoCmd.GotoControl shifting the form around
> a little if the form isn't "Wide enough"?  I have a popup that if it's just
> narrow enough to fit ALL the data, but docmd.gotocontrol will shift
> everything to the left a little bit (seen in this video)
>
> https://www.screencast.com/t/xvBhK3oCr
>
> If the form is slightly wider, this doesn't happen but makes the form look
> weird with empty space on the right (this is a popup form with a sizable
> edge I'm tinkering with for people to move it to a second monitor (which is
> vertical, thus more narrow).
>
> If you watch, my index on the left (blue rectangle) gets cut in half as it
> moves off view and so far the only fix is to close the form and re-open it.
>
> The GotoControl is part of the ADD/DELETE/COPY buttons on the ribbon and
> have been working well on maximized forms (can't repo it there)....
>
>
>


More information about the AccessD mailing list