Trying to reference a subform's subform control in VBA. I have a main form which, via buttons, opens up a subform. Within that subform are several buttons that open up another subform. Basically a Russian doll scenario with buttons.
The end goal is to have one function being called with the sub-subform's being used as a variable in a function called GetFile. The workaround right now is that I have different versions of the GetFile function in each sub-subform's VBA.
Here's the sub-subform's button click code:
Private Sub cmdButton_Click()
Dim strForm As String
strForm = Me.Name
Call GetFile(strForm)
End Sub
Which then calls this module:
Function GetFile(strForm As String)
Forms!frmMainMenu!subFrm.Form!subFrm!chkImport.Visible = True
End Function
Currently, I get this error: Runtime Error '2465'.