Dim nd As String = e.Form.Controls("ComboBox1").Text
Dim sd As String = e.Form.Controls("ComboBox2").Text
Dim str As String = "-1,"
str &= DataTables("生存认证资料").GetComboListString(“姓名" and "公民身份号码", "认证年度 = '" & nd & "'" Or "认证时段 = '" & sd & "'").replace("|", ",")
Tables("退休生存人员").filter = "_Identify in (" & str.trim(",") & ")"
'==========================以上是筛选已经认证的人员==============================
Dim Book As New XLS.Book(ProjectPath & "Attachments\退休认证表.xls")
Book.Build()
Book.Save(ProjectPath & "Reports\退休认证表.xls")
Dim Proc As New Process
Proc.File = ProjectPath & "Reports\退休认证表.xls"
Proc.Start()
'==============================以上是认证报表打印=================================
Tables("退休生存人员").Filter = ""
e.Form.Close
以上是我自己弄的代码,但报错;主要问题出现在数据筛选上。其它是否还有问题还不清楚。请各位老师帮忙纠正下。此代码是用于[按钮]。
[此贴子已经被作者于2018/3/1 10:41:12编辑过]