How would I concatenate 2 strings to make a form control that I can reference with code.
I have a form with several combo box controls, I want a generic fill routine where I pass in the control name and it gets filled.
Here is my routine:
Private Sub Lookup_Fill(ByVal strType As String)
Dim lf As New clsLookups
Dim dt As DataTable = lf.DoLookup(strType)
Dim FormControl = strType
.DataSource = dt
.DisplayMember = "LookUpValue"
.SelectedIndex = 0
This is how I call:
I pass the variable into a proc that return a list (That works OK) I hit a problem when I try to refernce the form control (as a string I guess)
How do do this?