Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Display Pictures OnClick Tab (2000)

    Hi,

    i have a form with a tab control half way down with many tabs.

    On a couple of the tabs it reveals pictures. I do not want these pictures to be loaded in the 'OnCurrent' event of the form as the form would take too long to load when clicking through the records.

    Should a user click on the tab where the pictures are located, then I would like them to be loaded.

    What is the best way of achieving this?
    Best Regards,

    Luke

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Display Pictures OnClick Tab (2000)

    You can use the On Change event of the tab control (not of the individual tab pages). You can inspect the Value property of the tab control - it is the zero-based index of the tab being activated, i.e. 0 is the first tab, 1 the second one etc.. For example:

    Private Sub ctlTab_Change()
    Select Case Me.ctlTab.Value
    Case 1 ' Second tab
    ' Code to load a picture into the second tab here
    ...
    Case 3 ' Fourth tab
    ' Code to load a picture into the fourth tab here
    ...
    End Select
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •