I want to either lock or disable a subform based on the status of a combo box on the main form. This should occur on opening the form or changing the combo box's value. For example, if the combo box on the main form says "complete" then i wan to disable or lock all subforms appearing on the main form so they cannot be edited.
I have tried disabling: edits, additions and deletions but htis makes the data in the subform disappear which is undesirable.
I have tried declaring the subform as a form datatype then tried changing its properties based on the status (see below) of the main form's combo box but this does not work because (i think) a form does not have a locked property although a subform does. I do not know how to declare it as a subform though or if this would help:
eg of code used
If Status = "Complete" Then
Forms![mainform]![Subform].Form.Locked = true
End If
Any help is appreciated
Simon
I have tried disabling: edits, additions and deletions but htis makes the data in the subform disappear which is undesirable.
I have tried declaring the subform as a form datatype then tried changing its properties based on the status (see below) of the main form's combo box but this does not work because (i think) a form does not have a locked property although a subform does. I do not know how to declare it as a subform though or if this would help:
eg of code used
If Status = "Complete" Then
Forms![mainform]![Subform].Form.Locked = true
End If
Any help is appreciated
Simon