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

📄 frm_fangchan_query.frm

📁 前些年帮人写的毕业设计
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Frm_fangchan_query 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "房产信息查询"
   ClientHeight    =   1410
   ClientLeft      =   4185
   ClientTop       =   3225
   ClientWidth     =   2985
   Icon            =   "Frm_fangchan_query.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1410
   ScaleWidth      =   2985
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton Command2 
      Cancel          =   -1  'True
      Caption         =   "取消"
      Height          =   375
      Left            =   1620
      TabIndex        =   3
      Top             =   840
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   375
      Left            =   300
      TabIndex        =   2
      Top             =   840
      Width           =   975
   End
   Begin VB.TextBox Text1 
      Height          =   300
      Left            =   840
      TabIndex        =   1
      Top             =   240
      Width           =   1875
   End
   Begin VB.Label Label1 
      Caption         =   "房号"
      Height          =   255
      Left            =   180
      TabIndex        =   0
      Top             =   300
      Width           =   555
   End
End
Attribute VB_Name = "Frm_fangchan_query"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub Command1_Click()
    Dim cn As ADODB.Connection
    On Error GoTo myerr
    Dim rst As New ADODB.Recordset
    Dim sql As String
    Dim lt As ListItem
    Set cn = GetCn
    sql = "select fh,jzmj,symj,cz,cs,id from fangchan where fh='" & Trim(Text1) & "' order by 1"
   
    rst.Open sql, cn, 0, 1
    Frm_fangchan.ListView1.ListItems.Clear
    If rst.BOF And rst.EOF Then
        MsgBox "没有符合条件的记录!", vbExclamation, "提示"
        Exit Sub
    End If
    Do While Not rst.EOF
        Set lt = Frm_fangchan.ListView1.ListItems.Add(, , rst(0), 8, 8)
        For i = 1 To rst.Fields.Count - 1
            If i = 3 Or i = 4 Then
                lt.SubItems(i) = IIf(rst(i), "是", "否")
            Else
                lt.SubItems(i) = Trim(rst(i) & "")
            End If
        Next i
        rst.MoveNext
    Loop
    rst.Close
    cn.Close
    Unload Me
    Exit Sub
myerr:
    If Err = -2147217904 Then
        If rst.State = 1 Then rst.Close
        rst.Open "select count(*) from fangchan", cn, 0, 1
        If rst(0) = 0 Then
            Unload Me
            Exit Sub
        Else
            MsgBox Error, vbExclamation, "提示"
        End If
    Else
        MsgBox Error, vbExclamation, "提示"
    End If
End Sub

Private Sub Command2_Click()
    Unload Me
End Sub

⌨️ 快捷键说明

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