Enable/Disable a subforms object

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Birky
    New Member
    • Dec 2006
    • 52

    Enable/Disable a subforms object

    I have a form (Custom_Code) that has a sub form (Support_Groups _Form) associated to it. I have a need to enable and disable the fields depending on user selection but I am having trouble controlling the sub form objects. I am using the
    Code:
    Me.Project_Manager.Enabled = True
    Code to control the main forms objects but again I have no clue as to how to control the sub forms objects.

    If the sub forms name is “Support_Groups _Form” and the object within this form is named “ITS_ NT_Applications ” how do I format the command to enable and or disable the object?

    Any help would be greatly appreciated.
    Birky
  • puppydogbuddy
    Recognized Expert Top Contributor
    • May 2007
    • 1923

    #2
    Originally posted by Birky
    I have a form (Custom_Code) that has a sub form (Support_Groups _Form) associated to it. I have a need to enable and disable the fields depending on user selection but I am having trouble controlling the sub form objects. I am using the
    Code:
    Me.Project_Manager.Enabled = True
    Code to control the main forms objects but again I have no clue as to how to control the sub forms objects.

    If the sub forms name is “Support_Groups _Form” and the object within this form is named “ITS_ NT_Applications ” how do I format the command to enable and or disable the object?

    Any help would be greatly appreciated.
    Birky
    Assumption: Code to disable/enable is being executed from the main form.

    Disabling the subform control will also disable all the controls within the subform control object. If you want to disable only certain controls within the object, your syntax should be like this:

    Me!YourSubformC ontrol.Form.[controlToBeDisa bled].Enabled = False
    Me![Support_Groups_ Form].Form.[a control].Enabled = False

    Comment

    Working...