⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form2.frm

📁 银行的客户端模块
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form2 
   Caption         =   "管理员"
   ClientHeight    =   6465
   ClientLeft      =   120
   ClientTop       =   420
   ClientWidth     =   8610
   LinkTopic       =   "Form2"
   ScaleHeight     =   6465
   ScaleWidth      =   8610
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command2 
      Caption         =   "返回"
      Height          =   615
      Left            =   5040
      TabIndex        =   5
      Top             =   3600
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   615
      Left            =   3360
      TabIndex        =   4
      Top             =   3600
      Width           =   1095
   End
   Begin VB.TextBox Text2 
      Height          =   495
      IMEMode         =   3  'DISABLE
      Left            =   3360
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   2520
      Width           =   3015
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Left            =   3360
      TabIndex        =   1
      Top             =   1560
      Width           =   3015
   End
   Begin VB.Label Label3 
      Caption         =   "5位"
      Height          =   375
      Left            =   6840
      TabIndex        =   6
      Top             =   1560
      Width           =   615
   End
   Begin VB.Label Label2 
      Caption         =   "登陆密码"
      Height          =   255
      Left            =   2040
      TabIndex        =   2
      Top             =   2640
      Width           =   975
   End
   Begin VB.Label Label1 
      Caption         =   "管理员账号"
      Height          =   255
      Left            =   2040
      TabIndex        =   0
      Top             =   1680
      Width           =   1095
   End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Set rs = New ADODB.Recordset
cmd.CommandType = adCmdText
cmd.CommandText = "select employee_id,employee_secret_code from xinxi0504_23_employee " + _
                  "where employee_id= '" & Trim(Text1.Text) & "'  and authority='管理员'"
Set rs = cmd.Execute
If rs.EOF = True Then
       MsgBox "用户名不存在"
       Text1.Text = ""
       Text2.Text = ""
ElseIf Text2.Text <> Trim(rs.Fields("employee_secret_code")) Then
       MsgBox "密码错误"
       Text2.Text = ""
Else:
       employee_id = rs.Fields("employee_id")
       Form4.Show
       Unload Form2
End If

End Sub

Private Sub Command2_Click()
conn.Close
Form1.Show
Unload Form2
End Sub

Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
Text2.PasswordChar = "*"
Call connection_sql
End Sub






Private Sub Text1_LostFocus()
If Len(Text1.Text) <> 5 Then
MsgBox "账号长度不对"
End If

End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -