Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
在ComboBox1控件的ValueChanged事件中,我想如果选择空值,CheckedListBox控件不生成多选列,如果CheckedListBox控件中已存在多选列,清除已存在的多选列。我这样写选ComboBox1中不同的下拉选项,能添加相应表的列了,但已存在的没删除,在原有基础上添加,不合理,如何清除里面的选项?
Dim lst As WinForm.CheckedListBox = e.Form.Controls("CheckedListBox1")
Dim dlg As New SaveFileDialog
dlg.Filter = "Excel文件|*.xls"
If dlg.ShowDialog = DialogResult.Ok Then
Dim ex As New Exporter
ex.Format = "Excel" '导出格式为Excel
If e.Form.Controls("ComboBox1").Text = "比赛积分" Then
ex.SourceTableName = "比赛积分" '指定导出表
Else
ex.SourceTableName = "基本信息" '指定导出表
End If
ex.FilePath = dlg.FileName '指定目标文件路径
ex.Fields = lst.Value
Dim s As String
If e.Form.Controls("ComboBox2").Value = Nothing Then
Return
ElseIf e.Form.Controls("ComboBox2").Value > "" And e.Form.Controls("TextBox1").Text = Nothing Then
ex.Filter = "[棋赛名称] = '" & e.Form.Controls("ComboBox2").Value & "'"
ElseIf e.Form.Controls("ComboBox2").Value > "" And e.Form.Controls("TextBox1").Text > "" Then
ex.Filter = "[棋赛名称] = '" & e.Form.Controls("ComboBox2").Value & "' And [棋赛副名] = '" & e.Form.Controls("TextBox1").Text & "'"
End If
ex.Export()
End If
Forms("导出窗口").Close()
密码:888888
下载信息 [文件大小: 下载次数: ] 点击浏览该文件:象棋排赛2024323.rar