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

📄 frmxjch.frm

📁 储蓄管理演示系统.rar 用Visual Basic语言为某储蓄所建立一个“储蓄管理系统”
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmXjch 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "新建储户"
   ClientHeight    =   3855
   ClientLeft      =   4185
   ClientTop       =   4485
   ClientWidth     =   7665
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3855
   ScaleWidth      =   7665
   Begin VB.TextBox txtZz 
      Height          =   375
      Left            =   1680
      TabIndex        =   12
      Top             =   2160
      Width           =   5415
   End
   Begin VB.TextBox txtDh 
      Height          =   375
      Left            =   1680
      TabIndex        =   11
      Top             =   1680
      Width           =   3255
   End
   Begin VB.TextBox txtXm 
      Height          =   375
      Left            =   1680
      TabIndex        =   10
      Top             =   1200
      Width           =   3255
   End
   Begin VB.TextBox txtZh 
      BeginProperty DataFormat 
         Type            =   0
         Format          =   "99999"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   2052
         SubFormatType   =   0
      EndProperty
      Height          =   375
      Left            =   1680
      TabIndex        =   1
      Top             =   720
      Width           =   3255
   End
   Begin VB.PictureBox picButtons 
      Align           =   2  'Align Bottom
      Appearance      =   0  'Flat
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   300
      Left            =   0
      ScaleHeight     =   300
      ScaleWidth      =   7665
      TabIndex        =   6
      Top             =   3255
      Width           =   7665
      Begin VB.CommandButton cmdCancel 
         Caption         =   "取消(&C)"
         Height          =   300
         Left            =   3000
         TabIndex        =   9
         Top             =   0
         Width           =   1095
      End
      Begin VB.CommandButton cmdUpdate 
         Caption         =   "确认(&U)"
         Height          =   300
         Left            =   1320
         TabIndex        =   8
         Top             =   0
         Width           =   1095
      End
      Begin VB.CommandButton cmdClose 
         Caption         =   "关闭(&C)"
         Height          =   300
         Left            =   4680
         TabIndex        =   7
         Top             =   0
         Width           =   1095
      End
   End
   Begin VB.PictureBox picStatBox 
      Align           =   2  'Align Bottom
      Appearance      =   0  'Flat
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   300
      Left            =   0
      ScaleHeight     =   300
      ScaleWidth      =   7665
      TabIndex        =   5
      Top             =   3555
      Width           =   7665
   End
   Begin VB.Label lblLabels 
      Caption         =   "住址:"
      Height          =   255
      Index           =   3
      Left            =   960
      TabIndex        =   4
      Top             =   2280
      Width           =   1815
   End
   Begin VB.Label lblLabels 
      Caption         =   "电话:"
      Height          =   255
      Index           =   2
      Left            =   960
      TabIndex        =   3
      Top             =   1800
      Width           =   1815
   End
   Begin VB.Label lblLabels 
      Caption         =   "姓名:"
      Height          =   255
      Index           =   1
      Left            =   960
      TabIndex        =   2
      Top             =   1320
      Width           =   1815
   End
   Begin VB.Label lblLabels 
      Caption         =   "帐号:"
      Height          =   255
      Index           =   0
      Left            =   960
      TabIndex        =   0
      Top             =   780
      Width           =   1815
   End
End
Attribute VB_Name = "frmXjch"
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 Form_Load()
        
  Set adoPrimaryRS = New Recordset
  adoPrimaryRS.Open "select 帐号,姓名,电话,住址 from 储户 Order by 帐号", db, adOpenStatic, adLockOptimistic
End Sub

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

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

Private Sub cmdUpdate_Click()
  On Error Resume Next
  If Trim(txtZh) = "" Or Len(Trim(txtZh)) > 5 Then
    MsgBox "用户帐号不得为空,且长度不超过5位,请重新输入!"
  Else
    With adoPrimaryRS
        .MoveFirst
        Do While Not .EOF And adoPrimaryRS("帐号") <> Trim(txtZh)
            .MoveNext
            If .EOF Then
                Exit Do
            End If
        Loop
        If .EOF And adoPrimaryRS("帐号") <> Trim(txtZh) Then
            .AddNew
            adoPrimaryRS("帐号") = Trim(txtZh)
            adoPrimaryRS("姓名") = Trim(txtXm)
            adoPrimaryRS("电话") = Trim(txtDh)
            adoPrimaryRS("住址") = Trim(txtZz)
            .Update
            txtZh.SetFocus
        Else
            MsgBox "该帐号已经存在,请重新输入!"
        End If
    End With
  End If
  Clear
End Sub

Private Sub cmdClose_Click()
  Unload Me
End Sub

Private Sub Clear()
  On Error Resume Next
  txtZh = ""
  txtXm = ""
  txtDh = ""
  txtZz = ""
  txtZh.SetFocus
End Sub

⌨️ 快捷键说明

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