I have a form with 4 additional nested tables, for a total of 5 forms, each representing a tiered layer of my database. For the sake of conversation, let's call them Form_Master, sub1, sub2, sub3, sub4. What I want to do is disable editing on each form when Form_Master loads and whenever the form changes records (Form_Load and Form_Current). In order to edit records displayed in the forms, the user will need to click a command button. Here is the bulk of the code that will do the changes:
This function is then called during the Form_Load and Form_Current functions in Form_Master; they are also called when the two designated buttons are clicked.
Now for the issue: so far as I can tell, Access only allows the first 3 forms (up to sub2) to be changed in this manner. The subforms sub3 and sub4 will remain editable. I want to avoid this if at all possible. Any suggestions? Thanks in advance!
Code:
Private Sub AllowEdits_Change(val As Boolean)
' Me.AllowEdits = val
' Me.sub1.Form.AllowEdits = val
' Me!sub1.Form!sub2.Form.AllowEdits = val
' Me!sub1.Form!sub2.Form!sub3.Form.AllowEdits = val
' Me!sub1.Form!sub2.Form!sub3.Form!sub4.Form.AllowEdits = val
End Sub
Now for the issue: so far as I can tell, Access only allows the first 3 forms (up to sub2) to be changed in this manner. The subforms sub3 and sub4 will remain editable. I want to avoid this if at all possible. Any suggestions? Thanks in advance!