[AccessD] [EXTERNAL] Re: DoCmd.GotoControl shifts form?

Shane Groff shaneg at microsoft.com
Fri Mar 24 12:24:05 CDT 2023


Can you share a database that shows the problem?

Shane

Get Outlook for Android<https://aka.ms/AAb9ysg>
________________________________
From: AccessD <accessd-bounces+shaneg=microsoft.com at databaseadvisors.com> on behalf of Ryan W <wrwehler at gmail.com>
Sent: Friday, March 24, 2023 10:08:40 AM
To: Access Developers discussion and problem solving <accessd at databaseadvisors.com>
Subject: [EXTERNAL] Re: [AccessD] DoCmd.GotoControl shifts form?

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://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.screencast.com%2Ft%2FxvBhK3oCr&data=05%7C01%7Cshaneg%40microsoft.com%7C2a579fa7e1384531ae4008db2c8a74a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638152745433523037%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=pcU%2FjmTnSq%2BS%2FdN6iesZ3MdmZe9xAivGru8lRtTgj0w%3D&reserved=0<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)....
>
>
>
--
AccessD mailing list
AccessD at databaseadvisors.com
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdatabaseadvisors.com%2Fmailman%2Flistinfo%2Faccessd&data=05%7C01%7Cshaneg%40microsoft.com%7C2a579fa7e1384531ae4008db2c8a74a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638152745433523037%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=55Yh7HvtG61Clm%2BpYDqhZLy5xte%2BqLM9C%2BToSmwivOw%3D&reserved=0<https://databaseadvisors.com/mailman/listinfo/accessd>
Website: https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.databaseadvisors.com%2F&data=05%7C01%7Cshaneg%40microsoft.com%7C2a579fa7e1384531ae4008db2c8a74a8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638152745433523037%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=8QtdDqTFwrDOdiQNJG4gUou0%2FJT3jiByyQZ0j37SXeY%3D&reserved=0<http://www.databaseadvisors.com/>


More information about the AccessD mailing list