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

📄 修改密码.frm

📁 学生信息管理系统可以统计学生的成绩系统需要账户和密码也可以修改密码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form11 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "修改密码"
   ClientHeight    =   3540
   ClientLeft      =   2850
   ClientTop       =   3000
   ClientWidth     =   5670
   LinkTopic       =   "Form11"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   3540
   ScaleWidth      =   5670
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   525
      Left            =   3240
      TabIndex        =   5
      Top             =   2520
      Width           =   1035
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确认"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   525
      Left            =   720
      TabIndex        =   4
      Top             =   2520
      Width           =   915
   End
   Begin VB.TextBox Text2 
      Height          =   400
      IMEMode         =   3  'DISABLE
      Left            =   2160
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   1560
      Width           =   2355
   End
   Begin VB.TextBox Text1 
      Height          =   400
      IMEMode         =   3  'DISABLE
      Left            =   2160
      PasswordChar    =   "*"
      TabIndex        =   2
      Top             =   480
      Width           =   2355
   End
   Begin VB.Label Label2 
      Caption         =   "请确认新密码:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      Left            =   360
      TabIndex        =   1
      Top             =   1680
      Width           =   1635
   End
   Begin VB.Label Label1 
      Caption         =   "请输入新密码:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      Left            =   360
      TabIndex        =   0
      Top             =   600
      Width           =   1635
   End
End
Attribute VB_Name = "Form11"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Conn As New ADODB.Connection
Dim Rs As New ADODB.Recordset
Private Sub Command1_Click()
  Dim Txtsql As String
  'Dim Mrc As ADODB.Recordset
  'Set Cmd.ActiveConnection = Conn
  Txtsql = "select * from 用户表 where 用户名= '" & form1.Username2 & " '"
  'Cmd.CommandText = Txtsql
  'Cmd.CommandType = adCmdText
  'Set Mrc = Cmd.Execute
  Set Rs = ExecuteSQL(Txtsql) 'g
  If Text1.Text = "" Then
        MsgBox "密码不能为空!", vbExclamation, "出错啦!"
     Else
        If Trim(Text1.Text) <> Trim(Text2.Text) Then
              MsgBox "两次输入的密码不一样,请确认!", , "出错啦!"
              Exit Sub
           Else
              Rs("密码") = Trim(Text1.Text)
              Rs.Update
              Me.Hide
              MsgBox "修改密码成功!", , "修改密码!"
              
         End If
  End If
End Sub

Private Sub Command2_Click()
Unload Me

End Sub

Private Sub Form_Load()
connstr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\学生信息管理.mdb"
Conn.Open connstr
End Sub

Private Sub Form_Unload(Cancel As Integer)
Conn.Close
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    Text2.SetFocus
 End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   Command1.SetFocus
 End If
End Sub

⌨️ 快捷键说明

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