如2楼,这样改一下
Dim lst As WinForm.ComboBox = e.form.Controls("ComboBox1")
lst.items.Clear
e.Form.Controls("ComboBox1").Value = ""
Dim rq As String = e.form.Controls("DateTimePicker1").Value
Dim cmd As New SQLCommand
Dim dt As DataTable
If rq > "" Then
cmd.CommandText = "SELECT DISTINCT BRXM From {SFMX} Where RQ = #" & rq & "#"
Else
cmd.CommandText = "SELECT DISTINCT BRXM From {SFMX}"
End If
dt = cmd.ExecuteReader
e.Form.Controls("ComboBox1").Combolist = dt.GetComboListString("BRXM")