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

📄 form19.frm

📁 带界面的银行管理系统。包括客户界面和内部管理界面。采用两种方式来实现数据库的连接和实现。
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form19 
   Caption         =   "修改子页"
   ClientHeight    =   7635
   ClientLeft      =   60
   ClientTop       =   435
   ClientWidth     =   8250
   BeginProperty Font 
      Name            =   "楷体_GB2312"
      Size            =   15
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form19"
   Picture         =   "Form19.frx":0000
   ScaleHeight     =   7635
   ScaleWidth      =   8250
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      BackColor       =   &H00C0E0FF&
      Caption         =   "确定"
      Height          =   615
      Left            =   600
      Style           =   1  'Graphical
      TabIndex        =   14
      Top             =   6840
      Width           =   2055
   End
   Begin VB.CommandButton Command2 
      BackColor       =   &H00C0E0FF&
      Caption         =   "退出"
      Height          =   615
      Left            =   4200
      Style           =   1  'Graphical
      TabIndex        =   13
      Top             =   6840
      Width           =   2055
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00FFC0C0&
      Caption         =   "员工基本资料"
      Height          =   6255
      Left            =   240
      TabIndex        =   0
      Top             =   360
      Width           =   7095
      Begin VB.TextBox Text8 
         Alignment       =   2  'Center
         Height          =   495
         Left            =   2520
         TabIndex        =   18
         Top             =   5400
         Width           =   3855
      End
      Begin VB.TextBox Text7 
         Alignment       =   2  'Center
         Height          =   495
         IMEMode         =   3  'DISABLE
         Left            =   2520
         PasswordChar    =   "*"
         TabIndex        =   16
         Top             =   4680
         Width           =   3855
      End
      Begin VB.TextBox Text2 
         Alignment       =   2  'Center
         BackColor       =   &H00FFFFFF&
         Height          =   495
         Left            =   2520
         TabIndex        =   12
         Top             =   1080
         Width           =   3855
      End
      Begin VB.TextBox Text6 
         Alignment       =   2  'Center
         Height          =   495
         IMEMode         =   3  'DISABLE
         Left            =   2520
         PasswordChar    =   "*"
         TabIndex        =   5
         Top             =   3960
         Width           =   3855
      End
      Begin VB.TextBox Text5 
         Alignment       =   2  'Center
         BackColor       =   &H00E0E0E0&
         Enabled         =   0   'False
         Height          =   495
         IMEMode         =   3  'DISABLE
         Left            =   2520
         PasswordChar    =   "*"
         TabIndex        =   4
         Top             =   3240
         Width           =   3855
      End
      Begin VB.TextBox Text4 
         Alignment       =   2  'Center
         Height          =   495
         Left            =   2520
         TabIndex        =   3
         Top             =   2520
         Width           =   3855
      End
      Begin VB.TextBox Text3 
         Alignment       =   2  'Center
         Height          =   495
         Left            =   2520
         TabIndex        =   2
         Top             =   1800
         Width           =   3855
      End
      Begin VB.TextBox Text1 
         Alignment       =   2  'Center
         BackColor       =   &H00FFFFFF&
         Height          =   495
         Left            =   2520
         TabIndex        =   1
         Top             =   360
         Width           =   3855
      End
      Begin VB.Label Label8 
         Alignment       =   2  'Center
         BackColor       =   &H00FFC0C0&
         Caption         =   "上级帐号"
         Height          =   495
         Left            =   120
         TabIndex        =   17
         Top             =   5520
         Width           =   1575
      End
      Begin VB.Label Label7 
         Alignment       =   2  'Center
         BackColor       =   &H00FFC0C0&
         Caption         =   "确认新密码"
         Height          =   495
         Left            =   120
         TabIndex        =   15
         Top             =   4800
         Width           =   1575
      End
      Begin VB.Label Label6 
         Alignment       =   2  'Center
         BackColor       =   &H00FFC0C0&
         Caption         =   "新密码"
         Height          =   495
         Left            =   120
         TabIndex        =   11
         Top             =   4080
         Width           =   1575
      End
      Begin VB.Label Label5 
         Alignment       =   2  'Center
         BackColor       =   &H00FFC0C0&
         Caption         =   "操作密码"
         Height          =   495
         Left            =   120
         TabIndex        =   10
         Top             =   3360
         Width           =   1575
      End
      Begin VB.Label Label4 
         Alignment       =   2  'Center
         BackColor       =   &H00FFC0C0&
         Caption         =   "联系电话"
         Height          =   495
         Left            =   120
         TabIndex        =   9
         Top             =   2640
         Width           =   1575
      End
      Begin VB.Label Label3 
         Alignment       =   2  'Center
         BackColor       =   &H00FFC0C0&
         Caption         =   "家庭住址"
         Height          =   495
         Left            =   120
         TabIndex        =   8
         Top             =   1920
         Width           =   1575
      End
      Begin VB.Label Label2 
         Alignment       =   2  'Center
         BackColor       =   &H00FFC0C0&
         Caption         =   "操作帐号"
         Height          =   495
         Left            =   240
         TabIndex        =   7
         Top             =   480
         Width           =   1575
      End
      Begin VB.Label Label1 
         Alignment       =   2  'Center
         BackColor       =   &H00FFC0C0&
         Caption         =   "姓名"
         Height          =   495
         Left            =   120
         TabIndex        =   6
         Top             =   1200
         Width           =   1575
      End
   End
End
Attribute VB_Name = "Form19"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim con As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim rst As New ADODB.Recordset
Dim rst1 As New ADODB.Recordset

Private Sub Command1_Click()
con.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=wuhao"
If Text1.Text = "" Then
       MsgBox "操作帐号不能为空!"
        Text1.SetFocus
ElseIf Text1.Text = "" Then
        MsgBox "姓名不能为空!"
        Text1.SetFocus
ElseIf Text8.Text = "" Then
        MsgBox "上级帐号不能为空!"
        Text8.SetFocus
ElseIf Len(Text2.Text) > 15 Then
        MsgBox "姓名不能长于15位英文或7位中文"
        Text2.SetFocus
ElseIf Len(Text1.Text) > 15 Then
        MsgBox "操作帐号不得长于15位"
        Text1.SetFocus
ElseIf Len(Text4.Text) > 20 Then
        MsgBox "电话号码不得长于20位"
        Text4.SetFocus
ElseIf Len(Text3.Text) > 50 Then
        MsgBox "住址不得50个英文或25个中文"
        Text3.SetFocus
ElseIf Len(Text5.Text) > 15 Then
        MsgBox "密码不得大于15位"
        Text5.SetFocus
ElseIf Text6.Text <> Text7.Text Then
        MsgBox "两次输入的密码不一致,请重新输入"
        Text6.SetFocus

Else
rst1.Open "select * from worker_xx053_19  ", con, adOpenKeyset, adLockOptimistic
     rst1.Fields(0) = Trim(Text1.Text)
     rst1.Fields(1) = Trim(Text2.Text)
     rst1.Fields(2) = Trim(Text3.Text)
     rst1.Fields(3) = Trim(Text4.Text)
     If Trim(Text6.Text) <> "" Then
     rst1.Fields(4) = Trim(Text6.Text)
     Else
     rst1.Fields(4) = Trim(Text5.Text)
     End If
     
     rst1.Fields(5) = Trim(Text8.Text)
     rst1.Update
     MsgBox "成功修改资料!"
     'rst1.Close
     con.Close
      Unload Me
      Form7.Show
    
     End If






End Sub

Private Sub Command2_Click()
Unload Me
Form7.Show
End Sub

⌨️ 快捷键说明

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