0
votes

I would like to know the proper syntax to write a string which will activate and de-activate the record selectors on subform 'frmEffortImpact' located on the main form 'frmProjectCharter01'. Unfortunately I continue to get an error message "properties or methods not supported by object". This is the code i am currently using:

Private Sub cmdAddImpacts_Click()

If Me.AllowAdditions = True Then

    Forms![frmprojectcharter01]![frmEffortImpact].RecordSelectors = False

ElseIf Me.AllowAdditions = False Then

    Forms![frmprojectcharter01]![frmEffortImpact].RecordSelectors = True

End If
1

1 Answers

1
votes

With Forms![frmprojectcharter01]![frmEffortImpact] you are reaching the subform control (which has properties like SourceObject and LinkMasterFields). To get the normal Form properties of the form being used as a subform, you need to access the .Form property of the subform control.

Forms![frmprojectcharter01]![frmEffortImpact].Form.RecordSelectors = False

Then you can reach .RecordSelectors and others.