C
Chucklinn
Guest
I have some subforms that I am trying to unlock when I click on a edit button on the main tabbed form.
I have tried the following code
Private Sub EditRecord_Click()
Dim ctl As Control
Me.AllowEdits = True ' this opens the main forms edit property
For Each ctl In Me.Controls
If ctl.ControlType = acSubform Then
ctl.AllowEdits = True ' THIS IS WHERE I GET THE ERROR MESSAGE
End If
Next ctl
the error message is the object doesn't suport this property or method.
I have tried writing functions to get around this and nothing seems to work. any help will be appreciated
I have tried the following code
Private Sub EditRecord_Click()
Dim ctl As Control
Me.AllowEdits = True ' this opens the main forms edit property
For Each ctl In Me.Controls
If ctl.ControlType = acSubform Then
ctl.AllowEdits = True ' THIS IS WHERE I GET THE ERROR MESSAGE
End If
Next ctl
the error message is the object doesn't suport this property or method.
I have tried writing functions to get around this and nothing seems to work. any help will be appreciated