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

📄 form1.frm

📁 学籍管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form1 
   Caption         =   " "
   ClientHeight    =   3120
   ClientLeft      =   60
   ClientTop       =   420
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3120
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.ComboBox Combo1 
      Height          =   300
      Left            =   3240
      TabIndex        =   6
      Text            =   "系统用户"
      Top             =   240
      Width           =   1095
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   495
      Left            =   2760
      TabIndex        =   3
      Top             =   1440
      Width           =   1335
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   495
      Left            =   720
      TabIndex        =   2
      Top             =   1440
      Width           =   1335
   End
   Begin VB.TextBox Text2 
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   1440
      PasswordChar    =   "*"
      TabIndex        =   1
      Top             =   720
      Width           =   1695
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   1440
      TabIndex        =   0
      Top             =   240
      Width           =   1695
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   735
      Left            =   120
      Top             =   2160
      Width           =   2895
      _ExtentX        =   5106
      _ExtentY        =   1296
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Label Label2 
      Caption         =   "密码"
      Height          =   375
      Left            =   120
      TabIndex        =   5
      Top             =   840
      Width           =   1215
   End
   Begin VB.Label Label1 
      Caption         =   "用户名"
      Height          =   375
      Left            =   120
      TabIndex        =   4
      Top             =   240
      Width           =   1215
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim ss As String
Dim kk As String
Dim ff As New ADODB.Connection
Dim rs As New ADODB.Recordset

Private Sub Combo1_Click()
kk = Combo1.Text
End Sub

Private Sub Command1_Click()
Dim sq As String
If kk = "系统用户" Then
sq = "select * from 系统用户"
Else
sq = "select * from 普通用户"
End If

rs.Open (sq)
rs.MoveNext


Do Until rs.EOF()
If rs.Fields(0) = Text1.Text And rs.Fields(1) = Text2.Text Then
 MsgBox "欢迎进入系统"
 Form5.Show
  Exit Sub
Else
 MsgBox "对不起,你输入的密码或用户名错误"
 rs.Close
 Exit Sub
End If
 rs.MoveNext
Loop



 End Sub

Private Sub Command2_Click()
rs.Close
End
End Sub

Private Sub Form_Load()
Combo1.AddItem "系统用户"
Combo1.AddItem "普通用户"
kk = "系统用户"
Set ff = New ADODB.Connection
rs.CursorType = adOpenDynamic
ff.Provider = "microsoft.jet.oledb.4.0"
ff.ConnectionString = "data source=E:\15\学生成绩档案.mdb"
ff.Open
Set rs.ActiveConnection = ff


End Sub

⌨️ 快捷键说明

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