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

📄 deleteaccount.frm

📁 vb做的银行管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form deleteaccoun 
   Caption         =   "销户"
   ClientHeight    =   3615
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   6315
   LinkTopic       =   "Form1"
   ScaleHeight     =   3615
   ScaleWidth      =   6315
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text1 
      Height          =   270
      IMEMode         =   3  'DISABLE
      Index           =   2
      Left            =   1800
      PasswordChar    =   "*"
      TabIndex        =   8
      Top             =   1920
      Width           =   2415
   End
   Begin VB.TextBox Text1 
      Height          =   270
      IMEMode         =   3  'DISABLE
      Index           =   1
      Left            =   1800
      PasswordChar    =   "*"
      TabIndex        =   7
      Top             =   1560
      Width           =   2415
   End
   Begin VB.TextBox Text1 
      Height          =   270
      Index           =   0
      Left            =   1800
      TabIndex        =   6
      Top             =   1200
      Width           =   2415
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   375
      Left            =   3360
      TabIndex        =   4
      Top             =   2640
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   375
      Left            =   1200
      TabIndex        =   3
      Top             =   2640
      Width           =   975
   End
   Begin VB.Label Label4 
      Caption         =   "身份证号:"
      Height          =   255
      Left            =   720
      TabIndex        =   5
      Top             =   1560
      Width           =   1095
   End
   Begin VB.Label Label3 
      Caption         =   "密码:"
      Height          =   255
      Left            =   1080
      TabIndex        =   2
      Top             =   1920
      Width           =   975
   End
   Begin VB.Label Label2 
      Caption         =   "帐号:"
      Height          =   255
      Left            =   1080
      TabIndex        =   1
      Top             =   1200
      Width           =   975
   End
   Begin VB.Label Label1 
      Caption         =   "请输入要销户的帐号"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1440
      TabIndex        =   0
      Top             =   360
      Width           =   3015
   End
End
Attribute VB_Name = "deleteaccoun"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

'响应确定
Private Sub Command1_Click()
Dim cancancel As Boolean
cancancel = False
Dim str As String
 str = "select account.AuserID,Ausers.peopleID,account.Apassword from Ausers , account where Ausers.AuserID=account.AuserID"
Set cn = New Connection
Dim rst As Recordset
Set rst = New Recordset

cn.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=bank;Data Source=(local)"
cn.Open
rst.Open str, cn, adOpenDynamic, adLockOptimistic
''''''''''''''''''
'检查是否有空的
'''''''''''''''''
'MsgBox "dsflk" & Trim(rst.Fields("AuserID")) & "yttry"
For i = 0 To 2
If Text1(i).Text = "" Then
   MsgBox "请将信息输入完整!"
   Exit Sub
End If
Next i

'''''''''''''''''''''
'与数据库内数据做对比
'''''''''''''''''''''
rst.MoveFirst
Do While Not rst.EOF
 If Trim(rst.Fields("AuserID")) = Text1(0).Text And Trim(rst.Fields("peopleID")) = Text1(1).Text And Trim(rst.Fields("Apassword")) = Text1(2).Text Then
    cancancel = True
End If
rst.MoveNext
Loop
rst.Close
''''''''''''''''''''''''
'删除数据库内与之相关数据
'''''''''''''''''''''''''
    If cancancel = False Then
        MsgBox "帐户未找到,请确定您所输入的正确!"
        cn.Close
        Exit Sub
    Else
        cn.Execute "delete from Ausers where AuserID='" & Text1(0).Text & "'"
        cn.Execute "delete from account where AuserID='" & Text1(0).Text & "'"
        MsgBox "帐号删除成功!"
        cn.Close
        Unload Me
    End If
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

⌨️ 快捷键说明

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