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

📄 frmscch.frm

📁 储蓄管理演示系统.rar 用Visual Basic语言为某储蓄所建立一个“储蓄管理系统”
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmScch 
   Caption         =   "删除储户"
   ClientHeight    =   6225
   ClientLeft      =   3180
   ClientTop       =   3165
   ClientWidth     =   9120
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   ScaleHeight     =   6225
   ScaleWidth      =   9120
   Begin VB.CommandButton cmdCancel 
      Caption         =   "取消"
      Height          =   375
      Left            =   4200
      TabIndex        =   11
      Top             =   5520
      Width           =   1095
   End
   Begin VB.CommandButton cmdExit 
      Caption         =   "关闭"
      Height          =   375
      Left            =   6360
      TabIndex        =   5
      Top             =   5520
      Width           =   1095
   End
   Begin VB.CommandButton cmdDelete 
      Caption         =   "删除"
      Height          =   375
      Left            =   2040
      TabIndex        =   4
      Top             =   5520
      Width           =   1095
   End
   Begin VB.Frame Frame1 
      Caption         =   "要删除储户的信息"
      Height          =   3495
      Left            =   960
      TabIndex        =   3
      Top             =   1800
      Width           =   7335
      Begin VB.Label Label5 
         Height          =   375
         Left            =   480
         TabIndex        =   10
         Top             =   2400
         Width           =   3495
      End
      Begin VB.Label Label4 
         Height          =   375
         Left            =   480
         TabIndex        =   9
         Top             =   1920
         Width           =   3735
      End
      Begin VB.Label Label3 
         Height          =   375
         Left            =   480
         TabIndex        =   8
         Top             =   1440
         Width           =   3975
      End
      Begin VB.Label Label2 
         Height          =   495
         Left            =   480
         TabIndex        =   7
         Top             =   1080
         Width           =   3855
      End
      Begin VB.Label Label1 
         Height          =   375
         Left            =   480
         TabIndex        =   6
         Top             =   600
         Width           =   3375
      End
   End
   Begin VB.CommandButton cmdConfirm 
      Caption         =   "确定"
      Default         =   -1  'True
      Height          =   375
      Left            =   6600
      TabIndex        =   2
      Top             =   720
      Width           =   1215
   End
   Begin VB.TextBox txtZh 
      Height          =   405
      Left            =   3360
      TabIndex        =   1
      Top             =   720
      Width           =   2415
   End
   Begin VB.Label lblLabels 
      Caption         =   "请输入要删除的帐号:"
      Height          =   255
      Index           =   0
      Left            =   1320
      TabIndex        =   0
      Top             =   780
      Width           =   1815
   End
End
Attribute VB_Name = "frmScch"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim WithEvents adoPrimaryRS As Recordset
Attribute adoPrimaryRS.VB_VarHelpID = -1

Private Sub cmdCancel_Click()
    On Error Resume Next
    Clear
End Sub

Private Sub cmdConfirm_Click()
  On Error Resume Next
  Dim Jcye As Currency
  Jcye = 0
  
  Set adoPrimaryRS = New Recordset
  adoPrimaryRS.Open "SHAPE {select 帐号,结存金额 from 储蓄帐 where 帐号='" & txtZh & "' and 备注=True Order by 帐号}", db, adOpenStatic, adLockOptimistic
  If adoPrimaryRS.RecordCount > 0 Then
      Jcye = adoPrimaryRS("结存金额")
      Zh = adoPrimaryRS("帐号")
  End If

  adoPrimaryRS.Close
  
  adoPrimaryRS.Open "SHAPE {select 帐号,姓名,电话,住址 from 储户 where 帐号='" & txtZh & "' Order by 帐号}", db, adOpenStatic, adLockOptimistic
  If adoPrimaryRS.RecordCount > 0 Then
    Label1.Caption = "帐号:" & adoPrimaryRS("帐号")
    Label2.Caption = "姓名:" & adoPrimaryRS("姓名")
    Label3.Caption = "电话:" & adoPrimaryRS("电话")
    Label4.Caption = "住址:" & adoPrimaryRS("住址")
    Label5.Caption = "结存金额:" & Str(Jcye)
    cmdConfirm.Visible = False
    cmdDelete.Visible = True
    cmdCancel.Visible = True
  Else
    MsgBox Space(15) & "该帐号不存在!" & Space(15)
    txtZh = ""
  End If
    
End Sub

Private Sub Form_Load()
    cmdDelete.Visible = False
    cmdCancel.Visible = False
End Sub

Private Sub Form_Unload(Cancel As Integer)
  Screen.MousePointer = vbDefault
End Sub

Private Sub cmdDelete_Click()
  On Error GoTo DeleteErr
  With adoPrimaryRS
    .Delete
  End With
  Clear
  Exit Sub
DeleteErr:
  MsgBox Err.Description
End Sub

Private Sub cmdExit_Click()
  Unload Me
End Sub

Private Sub Clear()
    txtZh = ""
    Label1.Caption = ""
    Label2.Caption = ""
    Label3.Caption = ""
    Label4.Caption = ""
    Label5.Caption = ""
    cmdConfirm.Visible = True
    cmdDelete.Visible = False
    cmdCancel.Visible = False
End Sub

⌨️ 快捷键说明

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