J
johnlute
Win2000 and Access 2003
I recently fixed the clutter of my form designs by going to a single
subform control and a tab control. The subform has a null source
object value which then gets loaded via the tab control's OnChange
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 = "sfrmLocationsLocationIDs"
Me.sfrmCtl.LinkMasterFields = "txtLocationID"
Me.sfrmCtl.LinkChildFields = "txtLocationID"
Case 2
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject = "sfrmFacilitiesLocsContactIDs"
Me.sfrmCtl.LinkMasterFields = "txtLocationID"
Me.sfrmCtl.LinkChildFields = "txtLocationID"
Case 3
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject = "sfrmFacilitiesProfiles"
Me.sfrmCtl.LinkMasterFields = "numLocationAddressID"
Me.sfrmCtl.LinkChildFields = "numLocationAddressID"
Case 4
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject = "sfrmLocationsWebsites"
Me.sfrmCtl.LinkMasterFields = "txtLocationID"
Me.sfrmCtl.LinkChildFields = "txtLocationID"
Case 5
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject = "sfrmLocationsAttachments"
Me.sfrmCtl.LinkMasterFields = "txtLocationID"
Me.sfrmCtl.LinkChildFields = "txtLocationID"
End Select
End Sub
This works fine as long as the user has write permissions to the
database design. For all other users the code fails to fire.
Does anyone have any ideas how to resolve this?
Thanks!
I recently fixed the clutter of my form designs by going to a single
subform control and a tab control. The subform has a null source
object value which then gets loaded via the tab control's OnChange
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 = "sfrmLocationsLocationIDs"
Me.sfrmCtl.LinkMasterFields = "txtLocationID"
Me.sfrmCtl.LinkChildFields = "txtLocationID"
Case 2
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject = "sfrmFacilitiesLocsContactIDs"
Me.sfrmCtl.LinkMasterFields = "txtLocationID"
Me.sfrmCtl.LinkChildFields = "txtLocationID"
Case 3
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject = "sfrmFacilitiesProfiles"
Me.sfrmCtl.LinkMasterFields = "numLocationAddressID"
Me.sfrmCtl.LinkChildFields = "numLocationAddressID"
Case 4
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject = "sfrmLocationsWebsites"
Me.sfrmCtl.LinkMasterFields = "txtLocationID"
Me.sfrmCtl.LinkChildFields = "txtLocationID"
Case 5
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject = "sfrmLocationsAttachments"
Me.sfrmCtl.LinkMasterFields = "txtLocationID"
Me.sfrmCtl.LinkChildFields = "txtLocationID"
End Select
End Sub
This works fine as long as the user has write permissions to the
database design. For all other users the code fails to fire.
Does anyone have any ideas how to resolve this?
Thanks!