I have a Form that has a Sub-Form. That Sub-Form has several Sub-Forms of its own. I want the setting of a control on the Form to decide if the Sub-Form is enabled. And if it is, which of it's Sub-Forms are enabled. Here is what I have been working on.
Private Sub Form_Current()
If Me.Status = 1 Then
Me.Accesses_Subform.Enabled = True
Employee.[Form_Employee Code Frm].Form![Accesses Subform].Form![APC Subform].Enabled = True
Else: Me.Accesses_Subform.Enabled = False
End If
End Sub
I think I got the first two statements right. I check Status to see if it is a 1. If it is I enable the Accesses_Subform.
But, I also want to Enable the APC Sub-form that is on the Accesses Sub-Form. I don't think this code is correct. There are more items to add to the Then and the Else statements but I need help with the syntax when talking about a Sub-Form on a Sub-Form on a Form.
I hope you can understand my giberish...I am trying to stop using Macros and learn code.
Thanks,
Private Sub Form_Current()
If Me.Status = 1 Then
Me.Accesses_Subform.Enabled = True
Employee.[Form_Employee Code Frm].Form![Accesses Subform].Form![APC Subform].Enabled = True
Else: Me.Accesses_Subform.Enabled = False
End If
End Sub
I think I got the first two statements right. I check Status to see if it is a 1. If it is I enable the Accesses_Subform.
But, I also want to Enable the APC Sub-form that is on the Accesses Sub-Form. I don't think this code is correct. There are more items to add to the Then and the Else statements but I need help with the syntax when talking about a Sub-Form on a Sub-Form on a Form.
I hope you can understand my giberish...I am trying to stop using Macros and learn code.
Thanks,