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

📄 frm_xqzytj.frm

📁 物业管理系统在一本书上的数据光盘
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db_wygl.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db_wygl.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from tab_rkinfo"
      Caption         =   "Adodc2"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   465
      Left            =   1605
      Top             =   4515
      Width           =   2235
      _ExtentX        =   3942
      _ExtentY        =   820
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db_wygl.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db_wygl.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from tab_xqinfo"
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSChart20Lib.MSChart MSChart1 
      Height          =   2445
      Left            =   2265
      OleObjectBlob   =   "Frm_xqzytj.frx":0022
      TabIndex        =   0
      Top             =   240
      Width           =   4260
   End
   Begin VB.Label Label5 
      Caption         =   "Label5"
      Height          =   180
      Left            =   3285
      TabIndex        =   5
      Top             =   5220
      Width           =   750
   End
   Begin VB.Label Label4 
      Caption         =   "Label4"
      Height          =   285
      Left            =   2955
      TabIndex        =   4
      Top             =   5220
      Width           =   1125
   End
   Begin VB.Label Label3 
      Caption         =   "Label3"
      Height          =   300
      Left            =   795
      TabIndex        =   3
      Top             =   5280
      Width           =   1485
   End
   Begin VB.Label Label2 
      Caption         =   "Label2"
      Height          =   330
      Left            =   870
      TabIndex        =   2
      Top             =   5250
      Width           =   1230
   End
   Begin VB.Label Label1 
      Caption         =   "Label1"
      DataField       =   "小区名称"
      DataSource      =   "Adodc1"
      Height          =   360
      Left            =   765
      TabIndex        =   1
      Top             =   5280
      Width           =   1215
   End
End
Attribute VB_Name = "Frm_xqzytj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim j As String
Dim i, X, k, a, b As Integer
Private Sub Form_Load()
  Command1.Enabled = False
  Adodc1.RecordSource = "select * from tab_xqinfo"
  Adodc1.Refresh
  If Adodc1.Recordset.RecordCount > 0 Then
     Adodc1.Recordset.MoveFirst
     Do While Adodc1.Recordset.EOF = False
        Combo1.AddItem Label1.Caption
        Adodc1.Recordset.MoveNext
     Loop
  End If
End Sub
Private Sub Combo2_Click()
 If Combo2.Text = "人口统计" Then j = 1
 If Combo2.Text = "住房统计" Then j = 2
End Sub
Private Sub Command1_Click()
  Command1.Enabled = False
  Command2.Enabled = True
  If j = 1 Then
     Adodc3.RecordSource = "select * from tab_rktj"
     Adodc3.Refresh
     ReDim arrvalues(1 To 2, 1 To 2)
     For X = 1 To 2
     arrvalues(X, 1) = Adodc3.Recordset!性别
     arrvalues(X, 2) = Adodc3.Recordset!人数
     Adodc3.Recordset.MoveNext
     Next X
     MSChart1.ChartData = arrvalues
     MSChart1.Title = "小区人口比例图"
  End If
  If j = 2 Then
     Adodc5.RecordSource = "select * from tab_fwtj"
     Adodc5.Refresh
     ReDim arrvalues(1 To 2, 1 To 2)
     For X = 1 To 2
     arrvalues(X, 1) = Adodc5.Recordset!是否空闲
     arrvalues(X, 2) = Adodc5.Recordset!房间数
     Adodc5.Recordset.MoveNext
     Next X
     MSChart1.ChartData = arrvalues
     MSChart1.Title = "小区房屋比例图"
  End If
End Sub
Private Sub Command2_Click()
  If j = 1 Then
     Adodc2.RecordSource = "select * from tab_rkinfo where 小区名称='" + Combo1 + "'"
     Adodc2.Refresh
     i = Adodc2.Recordset.RecordCount
     Adodc2.RecordSource = "select * from tab_rkinfo where 小区名称='" + Combo1 + "'and 性别='女'"
     Adodc2.Refresh
     k = Adodc2.Recordset.RecordCount
     Label2.Caption = k
     Label3.Caption = i - k
     Adodc3.RecordSource = "select * from tab_rktj"
     Adodc3.Refresh
     If Adodc3.Recordset.RecordCount > 0 Then
        Do While Adodc3.Recordset.EOF = False
           Adodc3.Recordset.Delete
           Adodc3.Recordset.MoveNext
        Loop
     End If
     Adodc3.RecordSource = "select * from tab_rktj"
     Adodc3.Refresh
     Set adors = cn.Execute("insert into tab_rktj values('男','" & Label3 & "') ")
     Set adors = cn.Execute("insert into tab_rktj values('女','" & Label2 & "') ")
     Adodc3.Refresh
  End If
  If j = 2 Then
     Adodc4.RecordSource = "select * from tab_fwinfo where 小区名称='" + Combo1 + "'"
     Adodc4.Refresh
     a = Adodc4.Recordset.RecordCount
     Adodc4.RecordSource = "select * from tab_fwinfo where 小区名称='" + Combo1 + "'and 房屋状态 ='入住'"
     Adodc4.Refresh
     b = Adodc4.Recordset.RecordCount
     Label4.Caption = b
     Label5.Caption = a - b
     Adodc5.RecordSource = "select * from tab_fwtj"
     Adodc5.Refresh
     If Adodc5.Recordset.RecordCount > 0 Then
        Do While Adodc5.Recordset.EOF = False
           Adodc5.Recordset.Delete
           Adodc5.Recordset.MoveNext
        Loop
     End If
     Adodc5.RecordSource = "select * from tab_fwtj"
     Adodc5.Refresh
     Set adors = cn.Execute("insert into tab_fwtj values('入住','" & Label4 & "') ")
     Set adors = cn.Execute("insert into tab_fwtj values('空闲','" & Label5 & "') ")
     Adodc5.Refresh
  End If
  MsgBox "完成"
  Command1.Enabled = True
  Command2.Enabled = False
End Sub


⌨️ 快捷键说明

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