I'm so bad about this... I forgot to mention I an running Access 2002 on
Windows XP.
"Larry" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> I have a tab control with 7 tabs. When data is changed on one of the tabs,
> or has been changed and not "validated" by an admin person, I want the
> captions for the tabs to have an asterisk(*) next to the caption (i.e.
> "Location Information" becomes "* Location Information). This way the
admins
> know which tabs need something validated, pretty easily.
>
> I am adding the asterisk, with no problem. My problem comes in when I move
> to a new record. To begin with, I reset all the tabs, by calling a
> subroutine from the OnCurrent event that loops through the pages and
> removing the asterisk. Then I go in and set the tabs as needed for the
> current record.
>
> The situation is this. I am on record 2, which has an asterisk on the
> current tab (say tab 6). When I move to the previous record, the focus of
> the tab moves to tab 7 and some of the controls from tab 6 bleed through
and
> partially cover the controls on tab 7. This also happens if I am on tab 2
> (which has an asterisk), meaning that tab 7 gets focus and some of the
> controls on tab 2 bleed through to tab 7.
>
> If I am on tab 4, for example, which does not have an asterisk, when I
move
> to the previous record, tab 7 still gets the focus, but no controls bleed
> through.
>
> This does not appear to happen when I am moving forward through the
records,
> only when I move back. It also does not happen if there are no asterisks
on
> the any of the tabs, regardless of the direction I move (in other words,
no
> asterisk on tab 4 - move to the previous record and tab 4 continues to
> show).
>
> I have tracked it down to the following piece of code, but I cannot
> understand why this is causing the problem. If I put a break in this code,
> when the page caption is changed (pge.caption =....) that is when tab 7
gets
> focus! And it doesn't matter what tab it is that it is changing!! I watch
> the form, as the code executes, so I know when this line is processed,
that
> is when the form changes to tab 7.
>
> **** start code ****
> Private Sub ResetTabs()
> Dim pge As Page
>
> For Each pge In Me.tabInfo.Pages
> If Left(pge.Caption, 1) = "*" Then
> pge.Caption = Mid(pge.Caption, 3)
> End If
> Next pge
>
> Set pge = Nothing
> End Sub
> **** end code ****
>
> As I was testing this, to verify some of what I was typing, I actually
> crashed Access for the first time, by moving back and forth with and
without
> asterisks.
>
> Have I found a bug, or (as is more likely) can someone tell me what I'm
> doing wrong?
>
>
|