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

📄 form6.frm

📁 简易银行系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form6 
   BackColor       =   &H00FF0000&
   Caption         =   "修改密码"
   ClientHeight    =   4605
   ClientLeft      =   4590
   ClientTop       =   3375
   ClientWidth     =   6000
   LinkTopic       =   "Form6"
   ScaleHeight     =   6862.791
   ScaleMode       =   0  'User
   ScaleWidth      =   7692.308
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox Text2 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   2400
      PasswordChar    =   "*"
      TabIndex        =   6
      Top             =   2040
      Width           =   2535
   End
   Begin VB.TextBox Text1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   2400
      PasswordChar    =   "*"
      TabIndex        =   5
      Top             =   1320
      Width           =   2535
   End
   Begin VB.CommandButton Command2 
      BackColor       =   &H00C0FFFF&
      Caption         =   "返回"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3120
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   3240
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00C0FFFF&
      Caption         =   "确定"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1560
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   3240
      Width           =   975
   End
   Begin VB.Label Label3 
      BackColor       =   &H00C0FFFF&
      Caption         =   "请输入新密码"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   360
      TabIndex        =   2
      Top             =   1320
      Width           =   1815
   End
   Begin VB.Label Label2 
      BackColor       =   &H00C0FFFF&
      Caption         =   "请再次输入密码"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   120
      TabIndex        =   1
      Top             =   2040
      Width           =   2175
   End
   Begin VB.Line Line2 
      BorderWidth     =   2
      X1              =   0
      X2              =   7692.308
      Y1              =   1251.845
      Y2              =   1251.845
   End
   Begin VB.Line Line1 
      BorderWidth     =   2
      X1              =   0
      X2              =   7692.308
      Y1              =   1073.01
      Y2              =   1073.01
   End
   Begin VB.Label Label1 
      BackColor       =   &H00C0FFFF&
      Caption         =   "修改密码"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   21.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2040
      TabIndex        =   0
      Top             =   240
      Width           =   1815
   End
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
Dim s As String
    s = "select 密码 from yinhang where 卡号='" & Trim(str) & "'"
    rsstor (s)
    If Text1.Text = "" Then
        MsgBox "新密码不能为空"
        Text1.Text = ""
        Text2.Text = ""
        Text1.SetFocus
    ElseIf Not IsNumeric(Text1.Text) Then
        MsgBox "密码只能为数字"
        Text1.Text = ""
        Text2.Text = ""
        Text1.SetFocus
    ElseIf Len(Text1.Text) > 6 Or Len(Text1.Text) <> 6 Then
        MsgBox "密码应为6位数字"
        Text1.Text = ""
        Text2.Text = ""
        Text1.SetFocus
    ElseIf Text2.Text <> Text1.Text Then
        MsgBox "您输入的密码不一致,请重新输入!"
        Text1.Text = ""
        Text2.Text = ""
        Text1.SetFocus
    Else
        str1 = Text1.Text
        rss.Fields("密码") = str1
        rss.Update
        Unload Me
        If MsgBox("修改成功,请妥善保管好您的新密码!") = vbOK Then
            Form2.Show
        End If
    End If
End Sub

Private Sub Command2_Click()
    If MsgBox("您确定不修改密码吗?", vbQuestion + vbYesNo, "提示") = vbYes Then
        Unload Me
        Form2.Show
        End If
End Sub

⌨️ 快捷键说明

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