|
im DefDatabase As Database
Dim strDesDir As String
Dim strDesDir1 As String
If Text0 <> "" Then
strDesDir = Text0
If Len(strDesDir) > 3 Then
strDesDir = strDesDir & "\"
Else
strDesDir = strDesDir
End If
If Dir(strDesDir & "sbb.mdb") <> "" Then
Kill strDesDir & "sbb.mdb"
End If
'Application.NewCurrentDatabase (strDesDir & "\sbb", dbLangGeneral)
CreateDatabase strDesDir & "\sbb", dbLangGeneral
DoCmd.TransferDatabase acExport, "Microsoft Access", strDesDir & "\sbb.mdb", acTable, "生产报表主表上报表", "生产报表主表上报表", False
DoCmd.TransferDatabase acExport, "Microsoft Access", strDesDir & "\sbb.mdb", acTable, "生产报表附表上报表", "生产报表附表上报表", False
'DoCmd.RunSQL "DELETE * FROM jh_sbfb"
'DoCmd.RunSQL "DELETE * FROM jh_sbzb"
MsgBox "已在" & strDesDir & "目录下生成上报生产月报sbb.MDB文件!", vbInformation
Else
MsgBox "请选择正确的上报生产月报的盘符或路径! ", vbInformation
End If |
|