Hi,
I have a tab on a form with 7 pages. I have a need to hide on of the tabs depednent on whether a field is Null and if not based on its value. The tab I want to hide contains about 15 normal bound fields and 1 subform. The code to hide the tab page works fine and is as follows:
The problem I have is when navigating between records on the main form. Although the tab page does change between hidden and visible as you scroll through records the tab itself doesn't properly disappear - the tab text at the top goes and you can't select it but your left with an empty grey tab as per following images:
Am I doing something wrong or is there a workaround? If you subsequently then click on one of the other live Tab pages it does then hide properly but not until you do so?
Any ideas would be appreciated!
NOT HIDDEN:
HIDDEN BUT JUST NOT PROPERLY??:
I have a tab on a form with 7 pages. I have a need to hide on of the tabs depednent on whether a field is Null and if not based on its value. The tab I want to hide contains about 15 normal bound fields and 1 subform. The code to hide the tab page works fine and is as follows:
Code:
'Show/Hide Order Submission Tab
If IsNull(Me.txtOrderNumber) Then
Me.tabQuotes.Pages(5).Visible = False
Me.tabQuotes.Pages(0).SetFocus
ElseIf Left(Me.txtWorksOrderNumber, 1) = "J" Then
Me.tabQuotes.Pages(5).Visible = True
Me.tabQuotes.Pages(0).SetFocus
End If
The problem I have is when navigating between records on the main form. Although the tab page does change between hidden and visible as you scroll through records the tab itself doesn't properly disappear - the tab text at the top goes and you can't select it but your left with an empty grey tab as per following images:
Am I doing something wrong or is there a workaround? If you subsequently then click on one of the other live Tab pages it does then hide properly but not until you do so?
Any ideas would be appreciated!
NOT HIDDEN:
HIDDEN BUT JUST NOT PROPERLY??: