Share via

Cannot Disable Screen Updating While Refreshing a Tab Control

Anonymous
2013-02-08T01:15:01+00:00

I have a tab control on a large form.  The tab control has many subforms on the tabs.  When the user changes tabs, I have the tab control refresh itself, to refresh the data on the tab pages.  The refresh causes the first tab-ordered control on that tab to receive focus, thus causing the screen to "jump" around sometimes.  I need the screen not to "jump" around.  I tried disabling screen updating during the refresh a number of ways, including:

  • Application.Echo False
  • DoCmd.Echo False
  • Me.Painting = False

but, none worked.  Does anyone have any other ideas of ways to do this?  Any help will be appreciated!  Thanks!

Brian

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. Anonymous
    2013-02-10T04:08:41+00:00

    Tom,

    Thanks for your reply.  I discovered a non-programmatic solution to the problem.  I found that if I put a transparent unbound textbox with no border and of zero inches width at the top of each tab, and made it first in the tab's tab-order, the screen doesn't jump around.  As the textbox on each tab is unbound, nothing "bad" happens if the user changes tabs and starts typing immediately.  You just get the Windows piano-key sound to let you know that you've done something "wrong."  That's not a big problem in my opinion.  So I found a solution.  Yay!!

    Brian

    Was this answer helpful?

    0 comments No comments
  2. Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
    2013-02-10T02:33:07+00:00

    I tried to reproduce your issue but was not able to. There may be code in other events that causes this behavior.

    You may want to comment out more and more events to try to pinpoint where this problem is occurring.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2013-02-10T01:52:01+00:00

    Tom,

    Thanks for your reply.  The current code is in the tab control's Change event.  It's simply, "Me.Refresh".  Again, I tried putting the code:

    • Application.Echo False
    • DoCmd.Echo False
    • Me.Painting = False

    before - and the corresponding True statements - after the Me.Refresh, and the screen still "jumps" around.  Any ideas?

    Brian

    Was this answer helpful?

    0 comments No comments
  4. Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
    2013-02-08T02:24:44+00:00

    Refresh the tab control? As in:

    Me.myTabControl.Refresh

    ?

    Please show us some code, stripped to the bare essentials.

    Personally I would requery the subform on the tabcontrol:

    Me.mySubformControlOnTabX.Form.Requery

    This would not change the selected tab.

    Was this answer helpful?

    0 comments No comments