Dim Filter As String
Dim i As String = e.Form.Controls("ComboBox1").value
Dim n As String = e.Form.Controls("ComboBox3").value
With e.Form.Controls("combobox5")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & " 列名称 = '"& .Value &"' "
End If
End With
If Filter > "" Then
Tables(i).Filter = Filter
End If
Tables(i).Filter = Filter
MainTable = Tables(i) '打开生成的统计表
上面代码中的这句: Filter = Filter & " 列名称 = '"& .Value &"' " 中的"列名称
"用变量 n 一个如何设置,请师傅指导,谢谢!
[此贴子已经被作者于2011-5-20 8:21:49编辑过]