用下面的代码,自己修改整理一下
FileSys.DeleteFile("d:\test.mdb", 2, 2)
Dim ex As New Exporter
ex.SourceTableName = "主表" '指定导出表
ex.filepath = "d:\test.mdb" '指定目标文件
ex.Filter = "用户 = 'ar'"
ex.Export() '开始导出
Dim nums As String = DataTables("主表").GetComboListString("编号", "用户 = 'ar'")
nums = "'" & nums.Replace("|", "','") & "'"
ex = new Exporter
ex.SourceTableName = "关联表"
ex.FilePath = "d:\test.mdb"
ex.Filter = "编号 in (" & nums & ")"
ex.Export()
ex = new Exporter
ex.SourceTableName = "非关联表"
ex.FilePath = "d:\test.mdb"
ex.Filter = "编号 in (" & nums & ")"
ex.Export()