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

📄 frmadminzujin.frm

📁 本章示例使用的是Windows2000 Professional版的操作系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Begin VB.Form frmAdminZuJin 
   Caption         =   "租金管理"
   ClientHeight    =   6135
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   8520
   LinkTopic       =   "Form1"
   ScaleHeight     =   6135
   ScaleWidth      =   8520
   StartUpPosition =   3  '窗口缺省
   Begin VB.Frame Frame1 
      Height          =   735
      Index           =   1
      Left            =   240
      TabIndex        =   33
      Top             =   1680
      Width           =   2535
      Begin VB.TextBox Text2 
         Height          =   375
         Left            =   960
         TabIndex        =   34
         Top             =   240
         Width           =   615
      End
      Begin VB.Label Label3 
         Caption         =   "共有:"
         Height          =   255
         Index           =   1
         Left            =   240
         TabIndex        =   36
         Top             =   360
         Width           =   615
      End
      Begin VB.Label Label4 
         Caption         =   "条记录"
         Height          =   255
         Index           =   1
         Left            =   1800
         TabIndex        =   35
         Top             =   360
         Width           =   615
      End
   End
   Begin VB.Frame Frame3 
      Caption         =   "功能键"
      Height          =   1695
      Left            =   240
      TabIndex        =   22
      Top             =   0
      Width           =   6375
      Begin VB.CommandButton cmdClose 
         Caption         =   "关闭"
         Height          =   495
         Left            =   5040
         TabIndex        =   32
         Top             =   240
         Width           =   975
      End
      Begin VB.CommandButton cmdEdit 
         Caption         =   "修改"
         Height          =   495
         Left            =   360
         TabIndex        =   31
         Top             =   240
         Width           =   975
      End
      Begin VB.CommandButton cmdDel 
         Caption         =   "删除"
         Height          =   495
         Left            =   1440
         TabIndex        =   30
         Top             =   240
         Width           =   975
      End
      Begin VB.CommandButton cmdSave 
         Caption         =   "保存"
         Height          =   495
         Left            =   2640
         TabIndex        =   29
         Top             =   240
         Width           =   975
      End
      Begin VB.CommandButton cmdFirst 
         Caption         =   "第一条"
         Height          =   495
         Left            =   360
         TabIndex        =   28
         Top             =   960
         Width           =   975
      End
      Begin VB.CommandButton cmdPrev 
         Caption         =   "前一条"
         Height          =   495
         Left            =   1440
         TabIndex        =   27
         Top             =   960
         Width           =   975
      End
      Begin VB.CommandButton cmdNext 
         Caption         =   "后一条"
         Height          =   495
         Left            =   2640
         TabIndex        =   26
         Top             =   960
         Width           =   975
      End
      Begin VB.CommandButton cmdLast 
         Caption         =   "最后一条"
         Height          =   495
         Left            =   3840
         TabIndex        =   25
         Top             =   960
         Width           =   975
      End
      Begin VB.CommandButton cmdQuery 
         Caption         =   "查找"
         Height          =   495
         Left            =   5040
         TabIndex        =   24
         Top             =   960
         Width           =   975
      End
      Begin VB.CommandButton cmdCancel 
         Caption         =   "取消"
         Height          =   495
         Left            =   3840
         TabIndex        =   23
         Top             =   240
         Width           =   975
      End
   End
   Begin VB.Frame Frame2 
      Height          =   3495
      Left            =   240
      TabIndex        =   0
      Top             =   2400
      Width           =   8055
      Begin VB.TextBox Text1 
         Height          =   375
         Index           =   6
         Left            =   1320
         TabIndex        =   6
         Top             =   1560
         Width           =   1095
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Index           =   5
         Left            =   6480
         TabIndex        =   9
         Top             =   960
         Width           =   1095
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Index           =   4
         Left            =   3960
         TabIndex        =   5
         Top             =   960
         Width           =   1095
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Index           =   3
         Left            =   1320
         TabIndex        =   4
         Top             =   960
         Width           =   1095
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Index           =   2
         Left            =   6480
         TabIndex        =   3
         Top             =   360
         Width           =   1095
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Index           =   1
         Left            =   3960
         TabIndex        =   2
         Top             =   360
         Width           =   1095
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Index           =   0
         Left            =   1320
         TabIndex        =   1
         Top             =   360
         Width           =   1095
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Index           =   7
         Left            =   3960
         TabIndex        =   7
         Top             =   1560
         Width           =   1095
      End
      Begin VB.TextBox Text1 
         Height          =   1095
         Index           =   8
         Left            =   1320
         MultiLine       =   -1  'True
         TabIndex        =   8
         Top             =   2160
         Width           =   6255
      End
      Begin VB.Label Label1 
         Caption         =   "客户姓名"
         Height          =   255
         Index           =   6
         Left            =   360
         TabIndex        =   21
         Top             =   1680
         Width           =   855
      End
      Begin VB.Label Label2 
         Caption         =   "元"
         Height          =   255
         Index           =   0
         Left            =   5160
         TabIndex        =   20
         Top             =   1080
         Width           =   255
      End
      Begin VB.Label Label1 
         Caption         =   "租金月份"
         Height          =   255
         Index           =   5
         Left            =   5640
         TabIndex        =   19
         Top             =   480
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   "租金年份"
         Height          =   255
         Index           =   4
         Left            =   3000
         TabIndex        =   18
         Top             =   480
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   "欠费金额"
         Height          =   255
         Index           =   3
         Left            =   5640
         TabIndex        =   17
         Top             =   1080
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   "已交租金"
         Height          =   255
         Index           =   2
         Left            =   3000
         TabIndex        =   16
         Top             =   1080
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   "应交租金"
         Height          =   255
         Index           =   1
         Left            =   360
         TabIndex        =   15
         Top             =   1080
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   " 收费编号"
         Height          =   255
         Index           =   0
         Left            =   240
         TabIndex        =   14
         Top             =   480
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   "交费日期"
         Height          =   255
         Index           =   19
         Left            =   3000
         TabIndex        =   13
         Top             =   1680
         Width           =   855
      End
      Begin VB.Label Label2 
         Caption         =   "元"
         Height          =   255
         Index           =   4
         Left            =   2520
         TabIndex        =   12
         Top             =   1080
         Width           =   255
      End
      Begin VB.Label Label2 
         Caption         =   "元"
         Height          =   255
         Index           =   5
         Left            =   7680
         TabIndex        =   11
         Top             =   1080
         Width           =   255
      End
      Begin VB.Label Label1 
         Caption         =   "备    注"
         Height          =   255
         Index           =   20
         Left            =   360
         TabIndex        =   10
         Top             =   2640
         Width           =   855
      End
   End
End
Attribute VB_Name = "frmAdminZuJin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'定义几个共用变量
Dim rs_zujin As New ADODB.Recordset
Dim rs_count As New ADODB.Recordset
Dim rs_client As New ADODB.Recordset
Dim sqlcount As String
Dim sqlzujin As String
Dim sqlclient As String


Private Sub cmdCancel_Click()
   '取消按钮用于用户修改过程中放弃修改操作
   cmdSave.Enabled = False
   cmdCancel.Enabled = False
   cmdFirst.Enabled = True
   cmdPrev.Enabled = True
   cmdNext.Enabled = True
   cmdLast.Enabled = True
   cmdDel.Enabled = True
   cmdEdit.Enabled = True
   cmdQuery.Enabled = True
   For i = 0 To 8
      If IsNull(rs_zujin.Fields(i)) Then
         Text1(i).Text = ""
      Else
         Text1(i).Text = rs_zujin.Fields(i)
      End If
   Next i
   '设置各个text框不可写
   For i = 0 To 8
      Text1(i).Enabled = False
   Next i
   
End Sub

Private Sub cmdClose_Click()
   Unload Me
End Sub

Private Sub cmdDel_Click()
   '当单击删除记录时,需要弹出一个提示框,警告用户
   Dim answer As String
   answer = MsgBox("确定要删除吗?", vbYesNo, "")
   '确实删除
   If answer = vbYes Then
      rs_zujin.Delete  '删除当前记录
      rs_zujin.Update  '更新删除
      MsgBox "成功删除!", vbOKOnly + vbExclamation, ""
   Else
       Exit Sub
   End If
   '删除之后,显示总信息条数需要减 1
   Text2.Text = Val(Text2.Text) - 1
   '删除当前记录后,需要显示下一条记录,如果删除的是最后一条记录,则显示上一条记录
   '先移动rs_zujin记录到后一条
   rs_zujin.MoveNext

⌨️ 快捷键说明

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