Tab event

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top