新增文章
文章标题
分类
C#
云星空
K3 BOS
K3 功能
用友
Oracle
python
SQL
MySql
PHP
HTML
script
windows
Access
影视后期
财务
服务
生活
内容
Private Sub Form_Open(Cancel As Integer) Dim aHold As String: aHold = "123456789" Dim aCode As String: aCode = KeyCode(CStr(Hold)) Dim db As DAO.Database: Set db = CurrentDb Dim rs As DAO.Recordset: Set rs = db.OpenRecordset("tblPassword", dbOpenTable) rs.Index = "PrimaryKey" rs.Seek "=", Me.name If rs.NoMatch Then MsgBox "密码不存在": Cancel = -1 Else If Not (rs![KeyCode] = aCode) Then MsgBox "密码不正确", vbOKOnly, "提示": Cancel = -1 End If End If rs.Close db.Close End Sub
返回
保存