R
Robin
Hello,
I have a tab control (3 tabs) on which resides a subform per tab. I start
on Tab0 and move to Tab1 and the Case 1 below works. Same with Case 2 below.
But when I return to Tab0 nothing happens, regardless of the items
highlighed in the various listboxes on the subform.
The Code:
Select Case Me.tabSubC
Case 0
If Me.lstCSsubCe.Value <> Null Then
If Me.lstCAsubCe.Value <> Null Then
If Me.lstCRsubCe.Value <> Null Then
If Me.lstCEsubCe.Value <> Null Then
Me.bSubC1.Caption = "View Engagement"
Me.bSubC1.Enabled = False
Me.bSubC2.Caption = "Add Engagement"
Me.bSubC2.Enabled = False
Me.bSubC3.Caption = "Add Assignment"
Me.bSubC3.Enabled = False
Me.bSubC4.Caption = "Add Return/Report"
Me.bSubC4.Enabled = False
Me.bSubC5.Caption = "Engagement Notes"
Me.bSubC5.Enabled = False
End If
Me.bSubC1.Caption = "View Return/Report"
Me.bSubC1.Enabled = True
Me.bSubC2.Caption = "Add Return/Report"
Me.bSubC2.Enabled = True
Me.bSubC3.Caption = "Reserved"
Me.bSubC3.Enabled = False
Me.bSubC4.Caption = "Extend Return/Report"
Me.bSubC4.Enabled = True
Me.bSubC5.Caption = "Return/Report Notes"
Me.bSubC5.Enabled = True
End If
Me.bSubC1.Caption = "View Assignment"
Me.bSubC1.Enabled = True
Me.bSubC2.Caption = "Reserved"
Me.bSubC2.Enabled = False
Me.bSubC3.Caption = "Add Assignment"
Me.bSubC3.Enabled = True
Me.bSubC4.Caption = "Add Segment"
Me.bSubC4.Enabled = True
Me.bSubC5.Caption = "Assignment Notes"
Me.bSubC5.Enabled = True
End If
Me.bSubC1.Caption = "View Segment"
Me.bSubC1.Enabled = True
Me.bSubC2.Caption = "Reserved"
Me.bSubC2.Enabled = False
Me.bSubC3.Caption = "Reserved"
Me.bSubC3.Enabled = False
Me.bSubC4.Caption = "Add Segment"
Me.bSubC4.Enabled = True
Me.bSubC5.Caption = "Segment Notes"
Me.bSubC5.Enabled = True
End If
Case 1
Me.bSubC1.Caption = "Reserved"
Me.bSubC1.Enabled = False
Me.bSubC2.Caption = "Reserved"
Me.bSubC2.Enabled = False
Me.bSubC3.Caption = "Reserved"
Me.bSubC3.Enabled = False
Me.bSubC4.Caption = "Reserved"
Me.bSubC4.Enabled = False
Me.bSubC5.Caption = "Reserved"
Me.bSubC5.Enabled = False
Case 2
Me.bSubC1.Caption = "Reserved"
Me.bSubC1.Enabled = False
Me.bSubC2.Caption = "Reserved"
Me.bSubC2.Enabled = False
Me.bSubC3.Caption = "Reserved"
Me.bSubC3.Enabled = False
Me.bSubC4.Caption = "Reserved"
Me.bSubC4.Enabled = False
Me.bSubC5.Caption = "Reserved"
Me.bSubC5.Enabled = False
End Select
I have tried Not IsNull, ItemsSelected.Count <>0, <> Null, <> "" and others!
Please help.
Thank you,
Robin
I have a tab control (3 tabs) on which resides a subform per tab. I start
on Tab0 and move to Tab1 and the Case 1 below works. Same with Case 2 below.
But when I return to Tab0 nothing happens, regardless of the items
highlighed in the various listboxes on the subform.
The Code:
Select Case Me.tabSubC
Case 0
If Me.lstCSsubCe.Value <> Null Then
If Me.lstCAsubCe.Value <> Null Then
If Me.lstCRsubCe.Value <> Null Then
If Me.lstCEsubCe.Value <> Null Then
Me.bSubC1.Caption = "View Engagement"
Me.bSubC1.Enabled = False
Me.bSubC2.Caption = "Add Engagement"
Me.bSubC2.Enabled = False
Me.bSubC3.Caption = "Add Assignment"
Me.bSubC3.Enabled = False
Me.bSubC4.Caption = "Add Return/Report"
Me.bSubC4.Enabled = False
Me.bSubC5.Caption = "Engagement Notes"
Me.bSubC5.Enabled = False
End If
Me.bSubC1.Caption = "View Return/Report"
Me.bSubC1.Enabled = True
Me.bSubC2.Caption = "Add Return/Report"
Me.bSubC2.Enabled = True
Me.bSubC3.Caption = "Reserved"
Me.bSubC3.Enabled = False
Me.bSubC4.Caption = "Extend Return/Report"
Me.bSubC4.Enabled = True
Me.bSubC5.Caption = "Return/Report Notes"
Me.bSubC5.Enabled = True
End If
Me.bSubC1.Caption = "View Assignment"
Me.bSubC1.Enabled = True
Me.bSubC2.Caption = "Reserved"
Me.bSubC2.Enabled = False
Me.bSubC3.Caption = "Add Assignment"
Me.bSubC3.Enabled = True
Me.bSubC4.Caption = "Add Segment"
Me.bSubC4.Enabled = True
Me.bSubC5.Caption = "Assignment Notes"
Me.bSubC5.Enabled = True
End If
Me.bSubC1.Caption = "View Segment"
Me.bSubC1.Enabled = True
Me.bSubC2.Caption = "Reserved"
Me.bSubC2.Enabled = False
Me.bSubC3.Caption = "Reserved"
Me.bSubC3.Enabled = False
Me.bSubC4.Caption = "Add Segment"
Me.bSubC4.Enabled = True
Me.bSubC5.Caption = "Segment Notes"
Me.bSubC5.Enabled = True
End If
Case 1
Me.bSubC1.Caption = "Reserved"
Me.bSubC1.Enabled = False
Me.bSubC2.Caption = "Reserved"
Me.bSubC2.Enabled = False
Me.bSubC3.Caption = "Reserved"
Me.bSubC3.Enabled = False
Me.bSubC4.Caption = "Reserved"
Me.bSubC4.Enabled = False
Me.bSubC5.Caption = "Reserved"
Me.bSubC5.Enabled = False
Case 2
Me.bSubC1.Caption = "Reserved"
Me.bSubC1.Enabled = False
Me.bSubC2.Caption = "Reserved"
Me.bSubC2.Enabled = False
Me.bSubC3.Caption = "Reserved"
Me.bSubC3.Enabled = False
Me.bSubC4.Caption = "Reserved"
Me.bSubC4.Enabled = False
Me.bSubC5.Caption = "Reserved"
Me.bSubC5.Enabled = False
End Select
I have tried Not IsNull, ItemsSelected.Count <>0, <> Null, <> "" and others!
Please help.
Thank you,
Robin