📄 frm月库备份.frm
字号:
VERSION 5.00
Begin VB.Form Frm月库备份
Caption = "月库备份"
ClientHeight = 3075
ClientLeft = 60
ClientTop = 345
ClientWidth = 7110
LinkTopic = "Form1"
ScaleHeight = 3075
ScaleWidth = 7110
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton Command2
Cancel = -1 'True
Caption = "返 回 (&Q)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4530
TabIndex = 6
Top = 2220
Width = 1545
End
Begin VB.CommandButton Command1
Caption = "复 制 (&E)"
Default = -1 'True
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 4560
TabIndex = 5
Top = 1470
Width = 1545
End
Begin VB.Frame Frame2
Caption = "目的磁盘:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 945
Left = 4590
TabIndex = 2
Top = 90
Width = 2355
Begin VB.DriveListBox D1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 150
TabIndex = 3
Top = 420
Width = 2115
End
End
Begin VB.Frame Frame1
Caption = "需备份的月库选择:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2895
Left = 120
TabIndex = 0
Top = 90
Width = 3135
Begin VB.ComboBox Combo1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2340
Left = 120
Style = 1 'Simple Combo
TabIndex = 1
Top = 420
Width = 2865
End
End
Begin VB.Label Label1
Caption = "复制到->"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 3390
TabIndex = 4
Top = 480
Width = 1095
End
End
Attribute VB_Name = "Frm月库备份"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
On Error GoTo ER:
If Len(Combo1.Text) > 0 And (Left(Trim(d1.Drive), 2) = "a:" Or Left(Trim(d1.Drive), 2) = "b:" Or Left(Trim(d1.Drive), 2) = "A:" Or Left(Trim(d1.Drive), 2) = "B:") Then
hxfyear = Left(Combo1.Text, 4)
hxfmath = Right(Left(Combo1.Text, 7), 2)
dqklj = xtlj & "data\" & hxfyear & hxfmath & ".mdb"
Me.Caption = "正在复制文件,请等待....."
FileCopy dqklj, Trim(d1.Drive) + "\" & hxfyear & hxfmath & ".mdb"
hxfyn = MsgBox("复制完成!", 48)
Me.Caption = "报盘输出"
Unload Me
Else
If Left(Trim(d1.Drive), 2) <> "a:" And Left(Trim(d1.Drive), 2) <> "b:" And Left(Trim(d1.Drive), 2) <> "A:" And Left(Trim(d1.Drive), 2) <> "B:" Then
hxfyn = MsgBox("应选择软盘驱动器,请重选!", 48)
End If
If Len(Combo1.Text) = 0 Then
hxfyn = MsgBox("未选择工资库,请选择!", 48)
End If
End If
GoTo en
ER: hxfyn = MsgBox("磁盘未准备好或写保护等错误,请处理后再进行!", 48)
en: End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Set wdb = wws.OpenDatabase(xtlj + "dwxx.mdb")
Set wtb1 = wdb.OpenRecordset("月库登记", dbOpenTable)
Combo1.Clear
If wtb1.RecordCount > 0 Then
wtb1.MoveFirst
Do While Not wtb1.EOF
Combo1.AddItem wtb1("年") & "年" & wtb1("月") & "月"
wtb1.MoveNext
Loop
End If
wdb.Close
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -