这样看看吧。自己先修改对应的位置。
Dim c1 As Boolean = e.Form.Controls("xxxxxxxx").Checked
Dim c2 As Boolean = e.Form.Controls("xxxxxxxx").Checked
Dim c3 As Boolean = e.Form.Controls("xxxxxxxx").Checked
Dim filter As String = "1=1 "
If c1 Then filter &= " And [商城] = 'al'"
If c2 Then filter &= " And [商城] = 'apm'"
If c3 Then filter &= " And [商城] = 'uus'"
Dim ex As New Exporter
ex.SourceTableName = "quhuojilu"
ex.FilePath = "\\PC-server\取货\gd.mdb"
ex.Filter = filter & " And [状态] < 5"
If FileSys.FileExists(ex.FilePath) Then'如果目标文件已经存在
FileSys.DeleteFile(ex.FilePath) '则删除之
End If
[此贴子已经被作者于2013-2-16 11:10:36编辑过]