[AccessD] DoCmd.GotoControl shifts form?

Stuart McLachlan stuart at lexacorp.com.pg
Fri Mar 24 16:33:17 CDT 2023


Without seeing at least the whole "Lab Review Checklist" form and preferable the whole 
Access application window it's pretty hard to tell what is happening.

Also what is actually happening with the Add button. It is clearly more than just a 
Docmd.Goto.

Link to a stripped down sample database showing it would be useful.


On 24 Mar 2023 at 12:08, Ryan W wrote:

> 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:42PM 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)....
> >
> >
> >
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com




More information about the AccessD mailing list