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

📄 frmmodifyuserinfo.frm

📁 物业管理
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmmodifyuserinfo 
   Caption         =   "修改密码"
   ClientHeight    =   2175
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4320
   LinkTopic       =   "Form1"
   ScaleHeight     =   2175
   ScaleWidth      =   4320
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton cmdClose 
      Caption         =   "关闭"
      Height          =   300
      Left            =   3120
      TabIndex        =   7
      Top             =   1560
      Visible         =   0   'False
      Width           =   735
   End
   Begin VB.CommandButton cmdUpdate 
      Caption         =   "保存"
      Height          =   300
      Left            =   1200
      TabIndex        =   6
      Top             =   1560
      Visible         =   0   'False
      Width           =   735
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "取消"
      Height          =   300
      Left            =   2160
      TabIndex        =   5
      Top             =   1560
      Visible         =   0   'False
      Width           =   735
   End
   Begin VB.CommandButton cmdEdit 
      Caption         =   "修改"
      Height          =   300
      Left            =   240
      TabIndex        =   4
      Top             =   1560
      Visible         =   0   'False
      Width           =   735
   End
   Begin VB.TextBox Text1 
      Height          =   270
      IMEMode         =   3  'DISABLE
      Left            =   1560
      PasswordChar    =   "*"
      TabIndex        =   1
      Top             =   480
      Width           =   2175
   End
   Begin VB.TextBox Text2 
      DataField       =   "用户密码"
      Height          =   270
      IMEMode         =   3  'DISABLE
      Left            =   1560
      PasswordChar    =   "*"
      TabIndex        =   0
      Top             =   960
      Width           =   2175
   End
   Begin VB.Label Label1 
      Caption         =   "输入新密码"
      Height          =   255
      Left            =   240
      TabIndex        =   3
      Top             =   480
      Width           =   975
   End
   Begin VB.Label Label2 
      Caption         =   "请再输入密码"
      Height          =   255
      Left            =   240
      TabIndex        =   2
      Top             =   960
      Width           =   1215
   End
End
Attribute VB_Name = "frmmodifyuserinfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim WithEvents adoPrimaryRS As Recordset
Attribute adoPrimaryRS.VB_VarHelpID = -1
Dim mvBookMark As Variant
Dim mbEditFlag As Boolean
Dim mbDataChanged As Boolean
Private Sub Form_Load()
On Error Resume Next
    For Each TextBox In Me.Controls
        TextBox.Font.Name = "宋体"
        TextBox.Font.Size = 9
    Next
  Set adoPrimaryRS = New Recordset
    adoPrimaryRS.Open "select * from 用户信息", db, adOpenStatic, adLockOptimistic
  
  Set Text2.DataSource = adoPrimaryRS
  
      
   
   cmdCancel.Visible = True
   cmdEdit.Visible = True
   cmdUpdate.Visible = True
   cmdClose.Visible = True
End Sub
Private Sub cmdEdit_Click()
  cmdEdit.Visible = False
  On Error GoTo EditErr
  mbEditFlag = True
Exit Sub

EditErr:
   MsgBox "更改操作有错误", vbExclamation + vbOKOnly, pTitle
End Sub
Private Sub cmdCancel_Click()
  cmdEdit.Visible = True
 ' On Error Resume Next
 On Error GoTo CancelErr


  mbEditFlag = False
  adoPrimaryRS.CancelUpdate

  If mvBookMark > 0 Then
   adoPrimaryRS.Bookmark = mvBookMark
  Else
   adoPrimaryRS.MoveFirst
  End If
 
  Exit Sub
CancelErr:
   
   MsgBox "取消操作有错误", vbExclamation + vbOKOnly, pTitle

End Sub

Private Sub cmdUpdate_Click()
  On Error GoTo UpdateErr
  If Trim(Text1.Text) <> Trim(Text2.Text) Then
        MsgBox "密码输入不正确!", vbOKOnly + vbExclamation, "警告"
        Text2.SetFocus
        Text.Text = ""
  Else
  adoPrimaryRS.UpdateBatch adAffectAll
    MsgBox "恭喜!密码修改成功。", vbOKOnly + vbExclamation, "修改密码"
  mbEditFlag = False
  End If
  Exit Sub
UpdateErr:
   MsgBox "保存操作有错误", vbExclamation + vbOKOnly, pTitle
End Sub

Private Sub cmdClose_Click()
  frmmain.Enabled = True
  Unload Me
End Sub

 Private Sub Form_Unload(Cancel As Integer)
  frmmain.Enabled = True
  Unload Me
End Sub

⌨️ 快捷键说明

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