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

📄 登陆.frm

📁 vb+access 我专科毕业时候的毕业设计
💻 FRM
字号:
VERSION 5.00
Begin VB.Form 登陆 
   Caption         =   "图书馆管理系统"
   ClientHeight    =   3375
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5685
   LinkTopic       =   "Form1"
   ScaleHeight     =   3375
   ScaleWidth      =   5685
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox Text1 
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   2160
      PasswordChar    =   "*"
      TabIndex        =   6
      Top             =   1320
      Width           =   1815
   End
   Begin VB.CommandButton Command3 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1095
      Left            =   4320
      TabIndex        =   5
      Top             =   600
      Width           =   1095
   End
   Begin VB.CommandButton Command2 
      Caption         =   "退出"
      Height          =   495
      Left            =   2400
      TabIndex        =   4
      Top             =   2160
      Width           =   1455
   End
   Begin VB.CommandButton Command1 
      Caption         =   "登陆"
      Default         =   -1  'True
      Height          =   495
      Left            =   600
      TabIndex        =   3
      Top             =   2160
      Width           =   1455
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      ItemData        =   "登陆.frx":0000
      Left            =   2160
      List            =   "登陆.frx":0002
      Style           =   2  'Dropdown List
      TabIndex        =   2
      Top             =   600
      Width           =   1815
   End
   Begin VB.Label Label2 
      Caption         =   "密码"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   720
      TabIndex        =   1
      Top             =   1320
      Width           =   735
   End
   Begin VB.Label Label1 
      Caption         =   "用户名"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   720
      TabIndex        =   0
      Top             =   600
      Width           =   1215
   End
End
Attribute VB_Name = "登陆"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Dim db As Database

Private Sub Command1_Click()

Set db = OpenDatabase(App.Path & "\用户管理.mdb")
Set rs = db.OpenRecordset("select 管理者名称,登陆密码 from 用户信息 where 管理者名称 = '" & Combo1.Text & "'and 登陆密码 = '" & Text1.Text & "'")

    If Text1.Text = "" Then
       MsgBox ("请输入密码")
    Else
        If rs.EOF = True And rs.BOF = True Then
            n = MsgBox("密码错误!请重新输入!", vbExclamation)
            Text1.Text = ""
            Text1.SetFocus
        Else
            主界面.Show
            Unload Me
        End If
        rs.Close
    End If
    
            
End Sub

Private Sub Command2_Click()
    End
End Sub

Private Sub Command3_Click()
注册.Show
Unload Me
End Sub


Private Sub Form_Load()

Command3.Caption = "注" + vbCrLf + "册"
Set db = OpenDatabase(App.Path & "\用户管理.mdb")
Set rs = db.OpenRecordset("用户信息")

Dim str As String
  For i = 0 To Val(rs.RecordCount) - 1
    str = Trim(rs.Fields("管理者名称").Value)
         rs.MoveNext
            Combo1.AddItem str
  Next i
  Combo1.Text = Combo1.List(0)

rs.Close
  
End Sub

⌨️ 快捷键说明

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