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

📄 form7.frm

📁 VB编写的退税管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form7 
   Caption         =   "修改密码"
   ClientHeight    =   3135
   ClientLeft      =   4680
   ClientTop       =   2595
   ClientWidth     =   4155
   LinkTopic       =   "Form7"
   ScaleHeight     =   3135
   ScaleWidth      =   4155
   Begin VB.CommandButton Command3 
      Caption         =   "退出"
      Height          =   375
      Left            =   2760
      TabIndex        =   5
      Top             =   2520
      Width           =   1215
   End
   Begin VB.CommandButton Command2 
      Caption         =   "清空"
      Height          =   375
      Left            =   1440
      TabIndex        =   4
      Top             =   2520
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   375
      Left            =   120
      TabIndex        =   3
      Top             =   2520
      Width           =   1215
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   1920
      TabIndex        =   2
      Top             =   1680
      Width           =   1575
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   1920
      TabIndex        =   1
      Top             =   960
      Width           =   1575
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   1920
      TabIndex        =   0
      Top             =   360
      Width           =   1575
   End
   Begin VB.Label Label3 
      Caption         =   "再次输入新密码"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   240
      TabIndex        =   8
      Top             =   1800
      Width           =   1575
   End
   Begin VB.Label Label2 
      Caption         =   "输入新密码"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   240
      TabIndex        =   7
      Top             =   1080
      Width           =   1215
   End
   Begin VB.Label Label1 
      Caption         =   "输入旧密码"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   240
      TabIndex        =   6
      Top             =   480
      Width           =   1215
   End
End
Attribute VB_Name = "Form7"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Dim i

Private Sub Command1_Click()
'以下也是一段比较重要的代码
Dim cnn1 As ADODB.Connection
 Dim strCnn As String
' 打开连接。
strCnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=zlgl.mdb;Persist Security Info=False"
 Set cnn1 = New ADODB.Connection 'Adodc1.CommandType = adCmdTable
cnn1.Open strCnn

' 打开系统用户表。
Dim rstEmployees As ADODB.Recordset
Set rstEmployees = New ADODB.Recordset
rstEmployees.CursorType = adOpenKeyset
   rstEmployees.LockType = adLockOptimistic
rstEmployees.Open "系统用户", cnn1, , , adCmdTable

'将第一个记录中的用户口令的值赋值给变量
Dim varDate As Variant
varDate = rstEmployees!用户口令

'Adodc1.RecordSource =
'i = Adodc1.Recordset
'Adodc1.Recordset.Open
If Text1.Text <> varDate Then
MsgBox "您输入的原始密码不正确,请重新输入!", , "修改密码"
Text1.Text = ""
Text1.SetFocus
Else
    If Text2.Text <> Text3.Text Then
    MsgBox "两次输入的新密码不相符", , "注意"
    Else
    rstEmployees!用户口令 = Text2.Text  '将修改后的密码赋给记录
    rstEmployees.Update  '更新数据
    MsgBox "密码修改成功,系统自动退出", , "注意"
    End
    End If
End If
End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text1.SetFocus
End Sub

Private Sub Command3_Click()
End
End Sub

⌨️ 快捷键说明

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