In Design View, select the ENTIRE tab control, not just a page. Open the
property sheet and click on the Event tab. The first event is the Change
event.
A tab control's Change event occurs when the tab pages are clicked. This is
where, you'd place code to deal with navigation between tab pages.

Signature
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
> Arvin,
> I am not aware of a Change event on a tab control. There is a Change event
[quoted text clipped - 34 lines]
> > > Thanks,
> > > James
jamesdeckert - 21 Sep 2005 23:15 GMT
Thanks Arvin,
I will try it. Since it is sporadic, I may not know for a while if it works.
I am not aware of anything "unusual" that I am doing that causes this
problem.
I am thinking that it must be caused by something that needs reformated on
the subforms. For example, maybe you can't have the subform within a certain
margin of the edge of the tab control. Right now my Left property for each of
the tab controls is .0833. This is also the Left property for the subform. I
haven't tried to add a little "border" space between the two, but may try it
if Me.repaint doesn't work.
With such little feedback on this issue, I'm thinking that it doesn't happen
to other people, and so must be something within the formating of my
tabs/subforms.
Anyway, thanks for the response
James
> In Design View, select the ENTIRE tab control, not just a page. Open the
> property sheet and click on the Event tab. The first event is the Change
[quoted text clipped - 47 lines]
> > > > Thanks,
> > > > James
jamesdeckert - 23 Sep 2005 01:55 GMT
Well I just had it happen again with me.repaint in the TabFolders_Change
event. The problem occured when I did an Alt-Tab to switch between programs,
and when I returned to Access, the tab which was active changed to the
rightmost tab with the previously active tab data shown in the tab area. So
the tab which is shown as active and the data in the tab area don't match. I
got this to repeat several times consistantly by doing the same thing.
Something causes the active tab to change.
any other Ideas?
thanks
James
> In Design View, select the ENTIRE tab control, not just a page. Open the
> property sheet and click on the Event tab. The first event is the Change
[quoted text clipped - 47 lines]
> > > > Thanks,
> > > > James
Arvin Meyer [MVP] - 25 Sep 2005 16:06 GMT
There is a margin which must be maintained between any control and the edges
of the tab control. As near as I can guess, it's very slightly under a
1/10th of an inch. Also, if your code uses SendKeys there can be very
unpredictable results when focus changes between applications. Moving
between programs using Alt+Tab would be a Windows issue.

Signature
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
> Well I just had it happen again with me.repaint in the TabFolders_Change
> event. The problem occured when I did an Alt-Tab to switch between programs,
[quoted text clipped - 60 lines]
> > > > > Thanks,
> > > > > James
jamesdeckert - 03 Oct 2005 17:50 GMT
I have added 1/10" margin and have still run into the problem. I am not using
Sendkeys (I have played with it but found it very unreliable).
I am using a routine to resize the form to the screen size from Access 2002
Desktop Developers Handbook (Litwin, Getz, Gunderloy) p. 558. The repaint
problem could be something here which has to do with not returning to the
same active tab as was active before. I could take the routine out, but
otherwise it is very nice and allows the form to resize the controls to fit
the current screen size without designing multiple forms. The routine is
fairly involved and haven't taken the time to try debugging.
thanks for all the help,
James
> There is a margin which must be maintained between any control and the edges
> of the tab control. As near as I can guess, it's very slightly under a
[quoted text clipped - 82 lines]
> > > > > > Thanks,
> > > > > > James