Reference to a non-shared member requires an object reference in the declarations on "Form1.tabSearc h.". Anyone know why this is happening?
Code:
Public Function getArgs(ByVal Op As String, ByVal OpeningQuote As String, ByVal ClosingQuote As String, Optional ByVal controls As Windows.Forms.Control.ControlCollection = Form1.tabSearch.Controls) As String Dim args As String = " " Dim Text As New Control For Each Text In controls If TypeOf Text Is TextBox Then If Text.Text <> "" Then args = Text.Name & " " & Op & " " & OpeningQuote & Text.Text & ClosingQuote End If End If Next Return args End Function