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

📄 frm_rkinfocx.frm

📁 小区物业管理系统,(vb6+SQLServer2000+使用说明)
💻 FRM
📖 第 1 页 / 共 3 页
字号:
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   2
         BeginProperty Column00 
            DataField       =   "房间编号"
            Caption         =   "房间编号"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
            EndProperty
            BeginProperty Column01 
            EndProperty
         EndProperty
      End
      Begin MSAdodcLib.Adodc Adodc3 
         Height          =   330
         Left            =   705
         Top             =   975
         Width           =   1650
         _ExtentX        =   2910
         _ExtentY        =   582
         ConnectMode     =   0
         CursorLocation  =   3
         IsolationLevel  =   -1
         ConnectionTimeout=   15
         CommandTimeout  =   30
         CursorType      =   3
         LockType        =   3
         CommandType     =   1
         CursorOptions   =   0
         CacheSize       =   50
         MaxRecords      =   0
         BOFAction       =   0
         EOFAction       =   0
         ConnectStringType=   1
         Appearance      =   1
         BackColor       =   -2147483643
         ForeColor       =   -2147483640
         Orientation     =   0
         Enabled         =   -1
         Connect         =   ""
         OLEDBString     =   ""
         OLEDBFile       =   ""
         DataSourceName  =   ""
         OtherAttributes =   ""
         UserName        =   ""
         Password        =   ""
         RecordSource    =   ""
         Caption         =   "Adodc3"
         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
   End
   Begin MSAdodcLib.Adodc Adodc2 
      Height          =   375
      Left            =   450
      Top             =   4305
      Width           =   2100
      _ExtentX        =   3704
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "C"
      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          =   330
      Left            =   1215
      Top             =   6735
      Width           =   2550
      _ExtentX        =   4498
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      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 VB.Label Lbl_fjnumber 
      Caption         =   "Lbl_fjnumber"
      DataField       =   "房间编号"
      DataSource      =   "Adodc3"
      ForeColor       =   &H00FF0000&
      Height          =   480
      Left            =   2205
      TabIndex        =   18
      Top             =   5760
      Width           =   1875
   End
   Begin VB.Label Label2 
      Caption         =   "Label2"
      DataField       =   "小区名称"
      DataSource      =   "Adodc1"
      Height          =   180
      Left            =   1995
      TabIndex        =   8
      Top             =   1110
      Width           =   780
   End
   Begin VB.Label Lbl_dlname 
      Caption         =   "Lbl_dlname"
      DataField       =   "大楼名称"
      DataSource      =   "Adodc2"
      ForeColor       =   &H000000FF&
      Height          =   360
      Left            =   240
      TabIndex        =   7
      Top             =   5790
      Width           =   1815
   End
End
Attribute VB_Name = "Frm_rkinfocx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim j As String
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Private Sub Form_Load()
    Sleep 1000
    '自动识别路径
    '连接数据库
    Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
    Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
    Adodc3.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
    Adodc4.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
        Adodc5.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select * from tab_xqinfo"           '查询tab_xqinfo数据表
    Adodc1.Refresh                                             '刷新记录
    If Adodc1.Recordset.RecordCount > 0 Then                   '如果ADO对象的记录集大于零则执行
        On Error Resume Next                                   '错误处理
        Adodc1.Recordset.MoveFirst                             '移动记录指针
        Do While Adodc1.Recordset.EOF = False                  '当记录指针不是尾记录时,执行循环体
            Combo1.AddItem Adodc1.Recordset.Fields("小区名称") '将数据表中的字段名添加到Combo1中
            Adodc1.Recordset.MoveNext                          '移动记录指针
        Loop
    End If

    'DataGrid控件显示并允许对Recordset对象中代表记录和字段的一系列行和列进行数据操纵。
End Sub
Private Sub DataGrid1_Click()
    '查询tab_fwinfo表与tab_dlinfo表中字段名为"大楼名称"相同的记录集
    Adodc3.RecordSource = "select * from tab_fwinfo where 大楼名称= '" + Lbl_dlname + "'"
    Adodc3.Refresh                                           '刷新记录
    '查询tab_rkinfo表与tab_dlinfo表中“大楼名称”相同的记录集
    Adodc4.RecordSource = "select * from tab_rkinfo where 大楼名称 like '" + Lbl_dlname + "%'"
    Adodc4.Refresh                                           '刷新记录
    
    Adodc5.RecordSource = "select * from tab_yzinfo where 大楼名称 like '" + Lbl_dlname + "%'and 房间号码= '" + Lbl_fjnumber.Caption + "'"         '检索查询一个数据表
    Adodc5.Refresh                                           '刷新记录

End Sub
Private Sub DataGrid2_Click()
    '查询大楼名称相同,房间编号相同的记录集
    Adodc4.RecordSource = "select * from tab_rkinfo where 大楼名称 like '" + Lbl_dlname + "%' and 房间编号= '" + Lbl_fjnumber.Caption + "'"
    Adodc4.Refresh                                           '刷新记录
    Adodc5.RecordSource = "select * from tab_yzinfo where 大楼名称 like '" + Lbl_dlname + "%'and 房间号码= '" + Lbl_fjnumber.Caption + "'"         '检索查询一个数据表
    Adodc5.Refresh                                           '刷新记录


End Sub
Private Sub Combo1_Click()
    Adodc2.RecordSource = "select * from tab_dlinfo where 大楼编号 like '" + Combo1.Text + "%'"
    Adodc2.Refresh                                           '刷新记录
    Adodc3.RecordSource = "select * from tab_fwinfo where 大楼名称= '" + Lbl_dlname + "'"
    Adodc3.Refresh                                           '刷新记录
    Adodc4.RecordSource = "select * from tab_rkinfo where 大楼名称 like '" + Lbl_dlname + "%'"         '检索查询一个数据表
    Adodc4.Refresh                                           '刷新记录
    Adodc5.RecordSource = "select * from tab_yzinfo where 大楼名称 like '" + Lbl_dlname + "%'"         '检索查询一个数据表
    Adodc5.Refresh                                           '刷新记录
    Set DataGrid1.DataSource = Adodc2
    Set DataGrid2.DataSource = Adodc3
    Set DataGrid3.DataSource = Adodc4
End Sub
Private Sub Command1_Click()   '查询
  If Combo3.Text = "like" Then
      Adodc4.RecordSource = "select * from tab_rkinfo where " & Combo2.Text & " like +'%" & Text1.Text & "%'"
      Adodc4.Refresh                                           '刷新记录
   Else
      Adodc4.RecordSource = "select * from tab_rkinfo where " & Combo2.Text & " " & Combo3.Text & " '" & Text1.Text & "'"
      Adodc4.Refresh                                           '刷新记录
   End If
End Sub
Private Sub Command2_Click()    '退出
  Unload Me
End Sub

Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 13 Then Command1.SetFocus  '按回车键Command1获得焦点
End Sub

⌨️ 快捷键说明

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