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

📄 帐户管理.frm

📁 部门在用的用户申告系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Frmzhgl 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "帐户管理"
   ClientHeight    =   2160
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4695
   Icon            =   "帐户管理.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   2160
   ScaleWidth      =   4695
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton Cmdexit 
      Caption         =   "退出"
      Height          =   375
      Left            =   2760
      TabIndex        =   10
      Top             =   1680
      Width           =   735
   End
   Begin VB.CommandButton Cmdupdate 
      Caption         =   "确定"
      Default         =   -1  'True
      Height          =   375
      Left            =   1080
      TabIndex        =   9
      Top             =   1680
      Width           =   735
   End
   Begin VB.Frame Frame1 
      Caption         =   "输入"
      Height          =   1335
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   4455
      Begin VB.TextBox Txtnewpow 
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   3120
         PasswordChar    =   "*"
         TabIndex        =   8
         Top             =   840
         Width           =   855
      End
      Begin VB.TextBox Txtnewname 
         Height          =   375
         Left            =   3120
         TabIndex        =   7
         Top             =   240
         Width           =   855
      End
      Begin VB.TextBox Txtoldpow 
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   1080
         PasswordChar    =   "*"
         TabIndex        =   4
         Top             =   840
         Width           =   855
      End
      Begin VB.TextBox Txtoldname 
         Height          =   375
         Left            =   1080
         TabIndex        =   2
         Top             =   240
         Width           =   855
      End
      Begin VB.Label Label4 
         Caption         =   "新密码"
         Height          =   375
         Left            =   2280
         TabIndex        =   6
         Top             =   840
         Width           =   855
      End
      Begin VB.Label Label3 
         Caption         =   "新用户名"
         Height          =   375
         Left            =   2280
         TabIndex        =   5
         Top             =   240
         Width           =   735
      End
      Begin VB.Label Label2 
         Caption         =   "旧密码"
         Height          =   255
         Left            =   240
         TabIndex        =   3
         Top             =   840
         Width           =   735
      End
      Begin VB.Label Label1 
         Caption         =   "旧用户名"
         Height          =   255
         Left            =   240
         TabIndex        =   1
         Top             =   240
         Width           =   735
      End
   End
End
Attribute VB_Name = "Frmzhgl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Cmdexit_Click()
Unload Me
End Sub

Private Sub Cmdupdate_Click()
Dim rs As Recordset
Dim oldname, oldpow, newname, newpow As String
MousePointer = vbHourglass
'设置打开的临时表
Set rs = db.OpenRecordset("login")
'获取截面数据
oldname = Trim(Txtoldname.Text)
oldpow = Trim(Txtoldpow.Text)
newname = Trim(Txtnewname.Text)
'检查新用户名和密码
If newname = "" Then
   MsgBox "用户名不能为空", 48, "提示"
   Exit Sub
End If
newpow = Trim(Txtnewpow.Text)
If newpow = "" Then
  MsgBox "新密码不能为空", 48, "提示"
  Exit Sub
End If
'比较新旧用户名和密码
If oldname = rs.Fields!用户名 And oldpow = rs.Fields!密码 Then
'刷新数据
   rs.Edit
   rs.Fields!用户名 = newname
   rs.Fields!密码 = newpow
   rs.Update
   MsgBox "帐户修改成功", 64, "信息"
   MousePointer = vbDefault
   rs.Close
   Unload Me
Else
   MsgBox "旧用户名密码不正确,帐户未修改", 48, "提示"
   Txtoldname.SetFocus
   MousePointer = vbDefault
   rs.Close
End If
End Sub
Private Sub Form_Load()
MDIFrm.numzhgl.Enabled = False
'设置窗体初试位置
Me.Top = 1500
Me.Left = 3000
Me.Height = 2535
Me.Width = 4785
End Sub
Private Sub Form_Unload(Cancel As Integer)
MDIFrm.numzhgl.Enabled = True
End Sub

⌨️ 快捷键说明

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