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

📄 form5.frm

📁 该程序用VB和Access数据库编写的酒店管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form5 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "管理员密码修改"
   ClientHeight    =   5115
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   5625
   LinkTopic       =   "Form5"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   5115
   ScaleWidth      =   5625
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   615
      Left            =   2760
      TabIndex        =   5
      Top             =   3360
      Width           =   1455
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   615
      Left            =   360
      TabIndex        =   4
      Top             =   3360
      Width           =   1455
   End
   Begin VB.TextBox Text3 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2280
      TabIndex        =   3
      Top             =   2160
      Width           =   2055
   End
   Begin VB.TextBox Text2 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2280
      TabIndex        =   2
      Top             =   1320
      Width           =   2055
   End
   Begin VB.Label Label3 
      Caption         =   "确认密码:"
      Height          =   495
      Left            =   360
      TabIndex        =   1
      Top             =   2400
      Width           =   1215
   End
   Begin VB.Label Label2 
      Caption         =   "输入新密码:"
      Height          =   495
      Left            =   360
      TabIndex        =   0
      Top             =   1440
      Width           =   1215
   End
End
Attribute VB_Name = "Form5"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim sql As String
Dim rs As New ADODB.Recordset
Dim cnn As ADODB.Connection
Private Sub Command1_Click()
If Trim(Text2.Text) <> Trim(Text3.Text) Then
   MsgBox "密码不一致!", vbOKOnly + vbExclamation, ""
   Text2.SetFocus
   Text2.Text = ""
   Text3.Text = ""
Else
  Set cnn = New ADODB.Connection
  If cnn.State = 1 Then cnn.Close
  cnn.Open "provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\信息表.mdb;Persist Security Info=False"
  Set rs = New ADODB.Recordset
  sql = "select * from 管理员表 where 管理员名='" + Form1.Text1.Text + "'"
  rs.Open sql, cnn, adOpenDynamic, adLockOptimistic
While (rs.EOF = False)

  If Trim(rs.Fields(0)) = Trim(Form1.Text1.Text) Then
         rs.Fields(1) = Text2.Text
 rs.Update
rs.MoveNext


 MsgBox "密码修改成功", vbOKOnly + vbExclamation, ""
   Unload Me
         End If
    Wend
  

End If
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
Text2.PasswordChar = "*"
Text3.PasswordChar = "*"
End Sub

⌨️ 快捷键说明

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