Access 2007 , Tab Control , Catch a Tab Click. How?!
Ok so you are using Access 2007 for this example. You pull out a Tab Control, and want to fire an event when the tab is clicked. Ok easy, I’ll just add a method to the TabControl Click event right? But you discover it doesn’t work.. Why isn’t it working!? Well thats the problem, the tab control click event only works when you click the tab control, it doesn’t work when you click the actual tabs.
Well here is the solution, and only a one big limit. If you have a Tab Page, it SHOULD have a control on it. This will break depending on the situation if a Tab Page is blank, only because this specific event may NOT be fired.
Dim pasttab As Integer
Private Sub Detail_Paint()
'the detail paint will be fired, when the tab is changed
Dim activetab As Integer
activetab = Me.TabCtl0.Value
If Not activetab = pasttab Then
pasttab = activetab
'put code for the fired event of a 'Click here
End If
End Sub
Buy:Petcam (Metacam) Oral Suspension.Accutane.Prednisolone.Lumigan.Human Growth Hormone.Mega Hoodia.Prevacid.Zovirax.Zyban.Retin-A.100% Pure Okinawan Coral Calcium.Valtrex.Arimidex.Actos.Nexium.Synthroid….