📄 frm_sdgl_query.frm
字号:
VERSION 5.00
Begin VB.Form Frm_sdgl_query
BorderStyle = 1 'Fixed Single
Caption = "水电费查询"
ClientHeight = 1485
ClientLeft = 45
ClientTop = 330
ClientWidth = 3660
Icon = "Frm_sdgl_query.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1485
ScaleWidth = 3660
StartUpPosition = 1 '所有者中心
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 2100
TabIndex = 3
Top = 960
Width = 1035
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 540
TabIndex = 2
Top = 960
Width = 1035
End
Begin VB.TextBox Text1
Height = 315
Left = 1260
TabIndex = 1
Top = 300
Width = 1935
End
Begin VB.Label Label1
Caption = "房号"
Height = 255
Left = 480
TabIndex = 0
Top = 360
Width = 615
End
End
Attribute VB_Name = "Frm_sdgl_query"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
On Error GoTo myerr
Dim cn As ADODB.Connection
Dim rst As New ADODB.Recordset
Dim lt As ListItem
Frm_sdgl.ListView1.ListItems.Clear
Set cn = GetCn
' rst.Open "select b.fh,a.yzid,a.xm,a.sfrq,a.zgf,a.sbsy,a.sbby,a.dbsy,a.dbby,a.cbrq,a.cby,a.sf,a.sb,a.ss,a.qt,a.df,a.yj,a.sj,a.zn,a.sky from jiaofei a inner join fangchan b on a.fcid=b.id where a.sfrq<=#" & DTPicker1.Value & "# and a.sfrq>=#" & DTPicker2.Value & "# order by 1", cn, 0, 1
rst.Open "select c.fh,b.xm,a.zgf,a.sbsy,a.sbby,a.sf,a.dbsy,a.dbby,a.df,a.sb,a.ss,a.qt,a.yj,a.cby,a.cbrq,a.id from (jiaofei a inner join yezhu b on a.fid=b.fid) inner join fangchan c on b.fid=c.id where c.fh='" & Trim(Text1) & "' order by 1", cn, 0, 1
If rst.BOF And rst.EOF Then Exit Sub
Do While Not rst.EOF
Set lt = Frm_sdgl.ListView1.ListItems.Add(, , rst(0), 4, 4)
For i = 1 To rst.Fields.Count - 1
lt.SubItems(i) = Trim(rst(i) & "")
Next i
rst.MoveNext
Loop
rst.Close
cn.Close
Unload Me
Exit Sub
myerr:
Select Case Err
Case -2147217904
If rst.State = 1 Then rst.Close
rst.Open "select count(*) from jiaofei", cn, 0, 1
If rst(0) = 0 Then
Exit Sub
Else
MsgBox Error, vbExclamation, "提示"
End If
Case Else
MsgBox Error, vbExclamation, "提示"
End Select
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -