?? 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 + -