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

📄 frmmodifymima.frm

📁 vb写的图书馆管理系统的源码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmmodifymima 
   Caption         =   "更改密码"
   ClientHeight    =   3030
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4695
   LinkTopic       =   "Form1"
   ScaleHeight     =   3030
   ScaleWidth      =   4695
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   375
      Left            =   2640
      TabIndex        =   5
      Top             =   2280
      Width           =   1335
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确认"
      Height          =   375
      Left            =   720
      TabIndex        =   4
      Top             =   2280
      Width           =   1335
   End
   Begin VB.TextBox Text2 
      Height          =   495
      IMEMode         =   3  'DISABLE
      Left            =   1680
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   1320
      Width           =   2535
   End
   Begin VB.TextBox Text1 
      Height          =   495
      IMEMode         =   3  'DISABLE
      Left            =   1680
      PasswordChar    =   "*"
      TabIndex        =   2
      Top             =   480
      Width           =   2535
   End
   Begin VB.Label Label2 
      Caption         =   "确认新密码:"
      Height          =   375
      Left            =   360
      TabIndex        =   1
      Top             =   1440
      Width           =   1335
   End
   Begin VB.Label Label1 
      Caption         =   "输入新密码:"
      Height          =   375
      Left            =   360
      TabIndex        =   0
      Top             =   600
      Width           =   1215
   End
End
Attribute VB_Name = "frmmodifymima"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim conn As New ADODB.Connection
Dim rs_mima As New ADODB.Recordset
Dim sql As String
conn.Open "provider=Microsoft.Jet.OLEDB.4.0; data source=" & App.Path & "\database.mdb"

  If Trim(Text1.Text) <> Trim(Text2.Text) Then
    MsgBox "密码不一致!", vbOKOnly + vbExclamation, ""
    Text1.SetFocus
    Text1.Text = ""
    Text2.Text = ""
    Exit Sub
  Else
    
    sql = "select * from 用户表 where user_ID='" & username & "'"
    
    rs_mima.Open sql, conn, adOpenKeyset, adLockPessimistic
    rs_mima.Fields(1) = Text1.Text
    rs_mima.Update
    MsgBox "密码修改成功", vbOKOnly + vbExclamation, ""
    Unload Me
  End If
End Sub

Private Sub Command2_Click()
  Unload Me
End Sub


⌨️ 快捷键说明

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