J
johnlute
Access 2003/Win 2000
I have a form with a tab control and subform. The tab control has an
On Change event to change the source object of the subform. The event
is also in the main form's current event.
This is a new design for me and it's been working fine except that
every so often the subform doesn't want to behave. It either won't
change to the proper source object or it will be invisible.
Here's the on change event:
Private Sub TabCtl_Change()
If Me.Dirty Then Me.Dirty = False
Select Case Me.TabCtl
Case 0
Me.sfrmCtl.Visible = False
Case 1
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject = "sfrmProfilesCodes"
Case 2
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject = "sfrmProfilesApprovals"
Case 3
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject = "sfrmFGPhysicalAttributes"
Case 4
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject = "sfrmPKProfilesQualifications"
Case 5
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject = "sfrmProfilesShipStorage"
Case 6
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject =
"sfrmProfilesLocationIDsSupplierIDs"
Case 7
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject = "sfrmPKProfilesAssociationsFG"
Case 8
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject = "sfrmProfilesAttachments"
End Select
End Sub
Is there something that I've done wrong or is this a common problem
with this kind of design?
Thanks!!!
I have a form with a tab control and subform. The tab control has an
On Change event to change the source object of the subform. The event
is also in the main form's current event.
This is a new design for me and it's been working fine except that
every so often the subform doesn't want to behave. It either won't
change to the proper source object or it will be invisible.
Here's the on change event:
Private Sub TabCtl_Change()
If Me.Dirty Then Me.Dirty = False
Select Case Me.TabCtl
Case 0
Me.sfrmCtl.Visible = False
Case 1
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject = "sfrmProfilesCodes"
Case 2
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject = "sfrmProfilesApprovals"
Case 3
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject = "sfrmFGPhysicalAttributes"
Case 4
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject = "sfrmPKProfilesQualifications"
Case 5
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject = "sfrmProfilesShipStorage"
Case 6
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject =
"sfrmProfilesLocationIDsSupplierIDs"
Case 7
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject = "sfrmPKProfilesAssociationsFG"
Case 8
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject = "sfrmProfilesAttachments"
End Select
End Sub
Is there something that I've done wrong or is this a common problem
with this kind of design?
Thanks!!!