Tab event

G

Gaetan

I need to run the following code when a specific tab is selected in a tab
control.
Anyone would know what would be the event procedure I should use?

If Me.cboGenderID.Value = 1 Then
Me.imgGenderShape.Picture = "C:\Man.bmp"
ElseIf Me.cboGenderID.Value = 2 Then
Me.imgGenderShape.Picture = "C:\Female.bmp"
Else
Me.imgGenderShape.Picture = ""
End If

Thanks.
 
J

Jeff Boyce

Take a look at the tab control's Change event. You'll need to use something
like a Select Case statement to identify which tab was clicked/selected.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Gaetan

Works perfectly... Thanks Jeff!

Jeff Boyce said:
Take a look at the tab control's Change event. You'll need to use something
like a Select Case statement to identify which tab was clicked/selected.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Top