J
Janice Walker via AccessMonster.com
I have a Mainform with subforms on it. The main form is "read Only" for
browsing purposes. When the User reaches a record to edit, there is a
"edit button" to edit the record.
I've tried the following code but it doesn't work. It only makes the main
form editable but not the subform....
Forms![FRM_Profile]![Sub_Profile].Form.AllowEdits = True
Forms![FRM_Profile]![Sub_Profile].Form.AllowDeletions = True
Forms![FRM_Profile]![Sub_Profile].Form.AllowAdditions = True
Dim ctlTemp
For Each ctlTemp In Me.Controls
For Each ctlTemp In Me.Controls
If ctlTemp.ControlType = acSubform Then
ctl.AllowEdits = True
Else
ctl.AllowEdits = True
End If
Next ctlTemp
Is there a good solution to this problem? Is my code correct?
Thanks!!
Janice
browsing purposes. When the User reaches a record to edit, there is a
"edit button" to edit the record.
I've tried the following code but it doesn't work. It only makes the main
form editable but not the subform....
Forms![FRM_Profile]![Sub_Profile].Form.AllowEdits = True
Forms![FRM_Profile]![Sub_Profile].Form.AllowDeletions = True
Forms![FRM_Profile]![Sub_Profile].Form.AllowAdditions = True
Dim ctlTemp
For Each ctlTemp In Me.Controls
For Each ctlTemp In Me.Controls
If ctlTemp.ControlType = acSubform Then
ctl.AllowEdits = True
Else
ctl.AllowEdits = True
End If
Next ctlTemp
Is there a good solution to this problem? Is my code correct?
Thanks!!
Janice