Ignorant newbie here needing help with calling a function. I'm trying to print an expanded tree view screen but keep getting various errors depending upon the structure of the call statement. Always fails on the "GetTreeViewText() line in the Sub. The latest version is as below. The form named "frm_treeview", the tree view object in the form is named "TreeReqs".What should be the correct syntax?
Private Sub PrntForm_Click()
GetTreeViewText (Me.Controls("TreeReqs")). <-- fails on this line
end subb
'GetTreeViewText (Forms("frm_Treeview").Controls("TreeReqs").Form) <-- another variation also fails
Function GetTreeViewText(treeView As treeView) As String
Dim treeText As String
Dim node As node
..
..
..
end function
Private Sub PrntForm_Click()
GetTreeViewText (Me.Controls("TreeReqs")). <-- fails on this line
end subb
'GetTreeViewText (Forms("frm_Treeview").Controls("TreeReqs").Form) <-- another variation also fails
Function GetTreeViewText(treeView As treeView) As String
Dim treeText As String
Dim node As node
..
..
..
end function