Dim names As new List (of String)
For Each c As Col In Tables("个案申请").Cols '遍历主表所有列
If c.DataCol.IsString Then '当主表列为字符列时,将列名作为names的元素
names.add(c.name)
End If
Next
'将names的元素用"|"分割为字符串作为条件筛选的下拉列表
Dim lb As String
Dim t As Integer
For t = 0 To names.Count-1
If t=0 Then
lb=names(t)
Else
lb=lb & "|" & names(t)
End If
Next
Dim cxtj As WinForm.ComboBox = e.Form.Controls("查询条件")
cxtj.ComboList = lb & "|全部" '将全部加入下拉列表
因为现在我设置窗口的表示副表,以上的代码失效了,如果用副表操作,以上的代码应该如何改呢??