Option Compare Database
Public Ce As Boolean
Private Sub Command0_Click()
Dim ps As String
ps = InputBox("输入导航栏编辑密码:")
If ps = "admin" Then
DoCmd.SelectObject acTable, "a", True
Else
MsgBox ("对不起你没开启的权限")
End If
End Sub
Private Sub Command1_Click()
DoCmd.SelectObject acTable, "a", True
DoCmd.RunCommand acCmdWindowHide
End Sub
Private Sub Command3_Click()
DoCmd.ShowToolbar "Ribbon", acToolbarNo
End Sub
Private Sub Command4_Click()
DoCmd.ShowToolbar "Ribbon", acToolbarYes
End Sub
Private Sub Command6_Click()
Ce = False
DoCmd.Close
End Sub
Private Sub Form_Activate()
Ce = True
End Sub
Private Sub Form_Load()
Ce = True
DoCmd.SelectObject acTable, "a", True
DoCmd.RunCommand acCmdWindowHide
End Sub
Private Sub Form_Unload(Cancel As Integer)
If Ce Then
Cancel = True
Else
Cancel = False
End If
End Sub
‘工程密码及编辑密码都为:admin
附件:
点击这里下载