'声明API函数用于数据备份和恢复
Private Declare Function CopyFile Lib "kernel32" Alias "CopyFileA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String, ByVal bFailIfExists As Long) As Long
Private Sub Form_Load()
Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 4000)
Me.Top = GetSetting(App.Title, "Settings", "MainTop", 4000)
Me.Width = GetSetting(App.Title, "Settings", "MainWidth", 6500)
Me.Height = GetSetting(App.Title, "Settings", "MainHeight", 6500)
'定位界面
End Sub
Private Sub mnudayindangan_Click()
Form5.Show '打开界面
End Sub
Private Sub mnudayinlaozi_Click()
DataReport5.Show '打开报表
End Sub
Private Sub mnulaozijifa_Click()
Form16.Show '打开界面
End Sub
Private Sub mnupeizhi_Click()
Form3.Show '打开界面
End Sub
Private Sub mnutuichu_Click()
End '退出所有程序
End Sub
Private Sub mnudayinwanzheng_Click()
'应做:添加 'mnudayinwanzheng_Click' 代码。
MsgBox "添加 'mnudayinwanzheng_Click' 代码。"
End Sub
Private Sub mnudayinjiandan_Click()
'应做:添加 'mnudayinjiandan_Click' 代码。
MsgBox "添加 'mnudayinjiandan_Click' 代码。"
End Sub
Private Sub mnulaozichaxun_Click()
Form9.Show '打开界面
End Sub
Private Sub mnudanganchaxun_Click()
Form4.Show '打开界面
End Sub
Private Sub mnudanganshanchu_Click()
Form1.Command2.Visible = False
Form1.Command1.Visible = True
Form1.Show '打开界面
End Sub
Private Sub mnudanganxiugai_Click()
Form1.Show '打开界面
Form1.Command2.Visible = True
Form1.Command1.Visible = False
End Sub
Private Sub mnudanganzengjia_Click()
Form2.Show '显示增加窗口
'控件初始化
Form2.Text3.Text = ""
Form2.Text5.Text = ""
Form2.Combo1.Text = ""
Form2.Combo4.Text = ""
End Sub
Private Sub munchushihua_Click()
Response = MsgBox("是否初始化?", vbYesNo)
If Response = vbYes Then
Dim mycn As New ADODB.Connection '初始化
Dim myrs As New ADODB.Recordset
Set myrs = New ADODB.Recordset
mycn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=mang.mdb;"
myrs.Open "delete FROM mang ;", mycn, adOpenKeyset, adLockOptimistic
myrs.Open "delete FROM zgjl ;", mycn, adOpenKeyset, adLockOptimistic
'通过SQL语言删除表中所有记录
MsgBox "成功"
Else
Exit Sub
End If
End Sub
Private Sub mundayinlvlibiao_Click()
DataReport6.Show '打开报表
End Sub
Private Sub munpeixunchaxun_Click()
Form13.Show '打开界面
End Sub
Private Sub munpeixundel_Click()
Form14.Show '打开界面
Form14.Command2.Visible = False
Form14.Command1.Visible = True
End Sub
Private Sub munpeixunluru_Click()
Form17.Show '显示增加窗口
End Sub
Private Sub munpeixunshanchu_Click()
Form11.Show '打开界面
Form11.Command1.Visible = True
Form11.Command1.Caption = "删除"
End Sub
Private Sub munpeixunxiugai_Click()
Form11.Show '打开界面
'显示command9按键,并将CAPTION属性定义为"修改"
Form11.Command1.Visible = True
Form11.Command1.Caption = "修改"
End Sub
Private Sub munpeixunmodi_Click()
Form14.Show '打开界面
Form14.Command2.Visible = True
Form14.Command1.Visible = False
End Sub
<< 上一页 [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] 下一页