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

📄 登录.frm

📁 着社会科技的发展
💻 FRM
字号:
VERSION 5.00
Begin VB.Form 登录 
   Caption         =   "人事管理系统登陆"
   ClientHeight    =   6420
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5505
   LinkTopic       =   "Form1"
   ScaleHeight     =   6420
   ScaleWidth      =   5505
   StartUpPosition =   3  '窗口缺省
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access 2000;"
      DatabaseName    =   ""
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   495
      Left            =   120
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   ""
      Top             =   3720
      Visible         =   0   'False
      Width           =   1860
   End
   Begin VB.CommandButton Command2 
      Caption         =   "退出"
      Height          =   375
      Left            =   4320
      TabIndex        =   6
      Top             =   3960
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "登录"
      Height          =   375
      Left            =   2280
      TabIndex        =   5
      Top             =   3960
      Width           =   975
   End
   Begin VB.Frame Frame1 
      Caption         =   "登录"
      Height          =   2775
      Left            =   720
      TabIndex        =   0
      Top             =   360
      Width           =   5055
      Begin VB.TextBox Text2 
         Height          =   375
         Left            =   2280
         TabIndex        =   2
         Top             =   1680
         Width           =   1575
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Left            =   2280
         TabIndex        =   1
         Top             =   840
         Width           =   1575
      End
      Begin VB.Label Label2 
         Caption         =   "请输入密码:"
         Height          =   255
         Left            =   945
         TabIndex        =   4
         Top             =   1680
         Width           =   1215
      End
      Begin VB.Label Label1 
         Caption         =   "请输入姓名:"
         Height          =   255
         Left            =   945
         TabIndex        =   3
         Top             =   960
         Width           =   1215
      End
   End
End
Attribute VB_Name = "登录"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub Command1_Click()
Dim sql As String
sql = App.Path
If Right(sql, 1) <> "/" Then
  sql = sql + "/"
  End If
  
  Dim mm As String
  mm = Text1.Text
  
  Data1.DatabaseName = sql + "stuff.mdb"
  Data1.RecordSource = "Select  * from 用户表 where 用户名='" & mm & "' "
  Data1.Refresh
  
  If Data1.Recordset.EOF Then
  Text1.Text = "用户名不正确!"
   Else
   If Data1.Recordset.Fields(1) = Text2.Text Then
   登录.Hide
    人事管理系统.Show
    Else
    Text2.Text = "用户密码不正确!"
    End If
    End If
    
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

⌨️ 快捷键说明

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