I have a main form (frmPropertyHistory) and a subform (frmMaterialsUseSubform). In the main form I have a combobox and an afterupdate event. The goal is to lock all controls in the subform when the combobox is updated.
This is my code:
I get error 2465 in the first line: "Can't find the field "frmMaterialsUseSubform" referred to in your expression.
What am I doing wrong?
Thanks
Mafhobb
This is my code:
Code:
For Each ctl In Forms!frmPropertyHistory!frmMaterialsUseSubform.Controls
Select Case ctl.ControlType 'Select the controls to lock
Case acTextBox 'Textboxes
ctl.Enabled = False
Case acComboBox 'ComboBoxes
ctl.Enabled = False
Case Else 'Rest
ctl.Enabled = False
End Select
Next
I get error 2465 in the first line: "Can't find the field "frmMaterialsUseSubform" referred to in your expression.
What am I doing wrong?
Thanks
Mafhobb