Results 1 to 2 of 2
2008-10-13, 01:33 #1
- Join Date
- Mar 2005
- Leicestershire, United Kingdom
- Thanked 0 Times in 0 Posts
Display Pictures OnClick Tab (2000)
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,
2008-10-13, 02:37 #2
- Join Date
- Mar 2002
- 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