hi folks,
i have a tabbed entry form with a title label across the top of the form. the title label is not on the tab control. there are 2 tabs on my tab control. what i would like to do is have 2 title labels and have the appropriate label appear when the corresponding tab is selected. i tried writing the following code and placing it in the OnClick event on the tab, but it isn't working. does someone know what i'm doing wrong. i think maybe i'm not referencing the control properly. the tab is named "Page32". the tab control itself is named "RequirementTabControl"
Private Sub Page32_Click()
On Error GoTo Finally
If (Forms!frmRequirementEntry.RequirementTabControl = "Page32") Then
Forms!frmRequirementEntry.AssignEquipmentLabel.Visible = True
Else
Forms!frmRequirementEntry.AssignEquipmentLabel.Visible = False
Finally:
If (Err.Number <> 0) Then
MsgBox Err.Description, vbExclamation, "Error"
End If
End Sub
many thanks for any help.
i have a tabbed entry form with a title label across the top of the form. the title label is not on the tab control. there are 2 tabs on my tab control. what i would like to do is have 2 title labels and have the appropriate label appear when the corresponding tab is selected. i tried writing the following code and placing it in the OnClick event on the tab, but it isn't working. does someone know what i'm doing wrong. i think maybe i'm not referencing the control properly. the tab is named "Page32". the tab control itself is named "RequirementTabControl"
Private Sub Page32_Click()
On Error GoTo Finally
If (Forms!frmRequirementEntry.RequirementTabControl = "Page32") Then
Forms!frmRequirementEntry.AssignEquipmentLabel.Visible = True
Else
Forms!frmRequirementEntry.AssignEquipmentLabel.Visible = False
Finally:
If (Err.Number <> 0) Then
MsgBox Err.Description, vbExclamation, "Error"
End If
End Sub
many thanks for any help.