Tab Control

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bobh

    #1

    Tab Control

    Hi All,
    In Access97 I have a form with a tab control on it. I want to detect
    when I 'Leave' one perticular tab called "DetailAmts ". How do I do
    that, I can detect which tab I'm going to by using case logic in the
    'On Change' event of the tab control but stuck on vba coding for
    figuring out which tab I came from.
    thanks
    bobh.

  • Allen Browne

    #2
    Re: Tab Control

    You could record the value each time the tab changes, and you would then
    know the previous value.

    In the General Declarations section of the form's module (at the top, with
    the Option statements):
    Private miTab As Integer

    In the Change event of the tab control (named MyTab in this example):
    Debug.Print "Just changed from tab " & miTab & " to " & Me.MyTab.Value
    miTab = Me.Mytab


    --
    Allen Browne - Microsoft MVP. Perth, Western Australia.
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.

    "bobh" <vulcaned@isp.c om> wrote in message
    news:1145978026 .080936.149400@ j33g2000cwa.goo glegroups.com.. .[color=blue]
    > Hi All,
    > In Access97 I have a form with a tab control on it. I want to detect
    > when I 'Leave' one perticular tab called "DetailAmts ". How do I do
    > that, I can detect which tab I'm going to by using case logic in the
    > 'On Change' event of the tab control but stuck on vba coding for
    > figuring out which tab I came from.
    > thanks
    > bobh.[/color]


    Comment

    Working...