📄 frm_huanyuan.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Frm_huanyuan
BorderStyle = 1 'Fixed Single
Caption = "数据恢复"
ClientHeight = 1485
ClientLeft = 45
ClientTop = 330
ClientWidth = 4200
Icon = "Frm_huanyuan.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1485
ScaleWidth = 4200
StartUpPosition = 1 '所有者中心
Begin VB.TextBox Text1
Height = 315
Left = 960
TabIndex = 3
Top = 240
Width = 2475
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 480
TabIndex = 2
Top = 900
Width = 1155
End
Begin VB.CommandButton Command2
Cancel = -1 'True
Caption = "取消"
Height = 375
Left = 2400
TabIndex = 1
Top = 900
Width = 1155
End
Begin VB.CommandButton Command3
Caption = "打开"
BeginProperty Font
Name = "宋体"
Size = 7.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3540
TabIndex = 0
Top = 180
Width = 495
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 3480
Top = 540
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.Label Label1
Caption = "存放路径"
Height = 255
Left = 180
TabIndex = 4
Top = 300
Width = 855
End
End
Attribute VB_Name = "Frm_huanyuan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
On Error GoTo myerr
FileCopy Text1, App.Path & "\data\wuye.mdb"
MsgBox "还原成功!", vbExclamation, "提示"
Unload Me
Exit Sub
myerr:
MsgBox Error, vbExclamation, "提示"
End Sub
Private Sub Command3_Click()
On Error GoTo myerr
Dim SaveFilePath As String
With CommonDialog1
.CancelError = True
.Filter = "Access文件(*.mdb)|*.mdb"
.DialogTitle = "备份Access"
.ShowOpen
If Trim(.FileName) = "" Then
Exit Sub
End If
SaveFilePath = .FileName
End With
Text1 = SaveFilePath
myerr:
Select Case Err.Number
Case 0
Case 32755 '用户取消时的错误号
Exit Sub
Case Else
MsgBox Err.Description, vbExclamation, "提示"
End Select
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -