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

📄 frmmodifyid.frm

📁 本系统是根据企业的特点
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmmodifyid 
   Caption         =   "修改密码"
   ClientHeight    =   4005
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6105
   LinkTopic       =   "Form1"
   ScaleHeight     =   4005
   ScaleWidth      =   6105
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   615
      Left            =   3120
      TabIndex        =   5
      Top             =   2640
      Width           =   1335
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确认"
      Height          =   615
      Left            =   840
      TabIndex        =   4
      Top             =   2640
      Width           =   1215
   End
   Begin VB.TextBox Text2 
      Height          =   495
      Left            =   3000
      TabIndex        =   3
      Top             =   1440
      Width           =   2295
   End
   Begin VB.TextBox Text1 
      Height          =   615
      Left            =   3000
      TabIndex        =   2
      Top             =   480
      Width           =   2295
   End
   Begin VB.Label Label2 
      Caption         =   "请确认新密码"
      Height          =   495
      Left            =   600
      TabIndex        =   1
      Top             =   1440
      Width           =   1815
   End
   Begin VB.Label Label1 
      Caption         =   "请输入新密码"
      Height          =   495
      Left            =   600
      TabIndex        =   0
      Top             =   480
      Width           =   1695
   End
End
Attribute VB_Name = "frmmodifyid"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command2_Click()
Me.Hide
frmMain.Show
End Sub

Private Sub Form_Load()
Set conn = New ADODB.Connection
conn.Open "DSN=电脑经营系统", ";pwd=14813808"
Set ado = New ADODB.Recordset
ado.Open "select * from 用户注册", conn, adOpenStatic, adLockOptimistic
End Sub


Private Sub Command1_Click()
Set conn = New ADODB.Connection
          conn.Open "DSN=电脑经营系统", ";pwd=14813808"
          Set ado = New ADODB.Recordset
          ado.Open "select * from 用户注册", conn, adOpenStatic, adLockOptimistic
Dim txtsql As String

If Text1.Text <> Text2.Text Then
 MsgBox "两次输入密码不一样,请确认", vbOKOnly + vbExclamation, "警告!"
   Text1.SetFocus
   Text1.Text = ""
  Else
txtsql = "select * from 用户注册 where 密码='" & Trim(Text1.Text) & "'"
ado.Fields("密码") = Text1.Text
ado.Update
ado.Close
MsgBox "密码修改成功!", vbOKOnly + vbExclamation, "修改密码"
Me.Hide
End If
End Sub




⌨️ 快捷键说明

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