Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740

    Unanswered: dis/en-able sections of subform

    hi team,

    i'm trying to selectively .enable the .detail section of a subform and making no progress.

    frmMother has a "hole" in it called frmDaughter
    frmDaughter is filled via .sourcebject from amongst 10 candidate daughters.

    under certain circumstances (to do with record owners and logins) the frmDaughter "hole" is .enabled = False

    even when frmDaughter is generally disabled, one particular candidate daughter frmThisOne needs the .Detail section enabled

    private sub Form_Load() 'running in frmThisOne
    Forms!frmMother!frmDaughter.Enabled = True ' is OK
    ...but i can't remember how to:
    .formfooter.enabled = false
    .formheader.enabled = false

    i've tried 30 different syntaxes, and i've run out of ideas

    thanks for any suggestions, izy
    currently using SS 2008R2

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    aaaah! silly me.
    seems you can't enable/disable sections of a form selectively.

    had to resort to:
    _Load()
    Dim ctrl As Control
    If RecordOwner <> RecordUser Then
    On Error Resume Next 'to avoid error "disabling" a box or line etc
    Forms!frmMother!frmDaughter.Enabled = True
    For Each ctrl In Me.Controls
    If ctrl.Name = "theOneToBeEnabled" Then
    ctrl.Enabled = True
    Else
    ctrl.Enabled = False
    End If
    Next
    End If


    izy
    currently using SS 2008R2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •