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

📄 frmshoufeifind.frm

📁 一个优秀的售楼系统,可供毕业生毕业设计参考
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmshoufeifind 
   BackColor       =   &H00C0FFFF&
   Caption         =   "收费查询"
   ClientHeight    =   7005
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   7560
   LinkTopic       =   "Form9"
   MaxButton       =   0   'False
   ScaleHeight     =   7005
   ScaleWidth      =   7560
   StartUpPosition =   2  '屏幕中心
   Begin VB.PictureBox MSHFlexGrid1 
      Height          =   4455
      Left            =   240
      ScaleHeight     =   4395
      ScaleWidth      =   6915
      TabIndex        =   14
      Top             =   2400
      Width           =   6975
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00C0FFFF&
      Caption         =   "查询条件"
      Height          =   2055
      Left            =   240
      TabIndex        =   0
      Top             =   240
      Width           =   6975
      Begin VB.PictureBox Printgrid1 
         Height          =   480
         Left            =   6120
         ScaleHeight     =   420
         ScaleWidth      =   1140
         TabIndex        =   15
         Top             =   1680
         Width           =   1200
      End
      Begin VB.CommandButton cmdexit 
         Caption         =   "退出"
         Height          =   375
         Left            =   4560
         TabIndex        =   13
         Top             =   1440
         Width           =   1095
      End
      Begin VB.CommandButton cmdprint 
         Caption         =   "打印"
         Height          =   375
         Left            =   2280
         TabIndex        =   12
         Top             =   1440
         Width           =   1095
      End
      Begin VB.CommandButton cmdfind 
         Caption         =   "查找"
         Height          =   375
         Left            =   240
         TabIndex        =   11
         Top             =   1440
         Width           =   1095
      End
      Begin VB.PictureBox DTPicker2 
         Height          =   255
         Left            =   3600
         ScaleHeight     =   195
         ScaleWidth      =   1515
         TabIndex        =   9
         Top             =   840
         Width           =   1575
      End
      Begin VB.PictureBox DTPicker1 
         Height          =   255
         Left            =   1320
         ScaleHeight     =   195
         ScaleWidth      =   1395
         TabIndex        =   8
         Top             =   840
         Width           =   1455
      End
      Begin VB.TextBox txtjkr 
         Height          =   270
         Left            =   5640
         TabIndex        =   7
         Top             =   240
         Width           =   1095
      End
      Begin VB.TextBox txtloupannum 
         Height          =   270
         Left            =   3600
         TabIndex        =   6
         Top             =   240
         Width           =   1095
      End
      Begin VB.TextBox txtshoufeinum 
         Height          =   270
         Left            =   1320
         TabIndex        =   5
         Top             =   240
         Width           =   1095
      End
      Begin VB.OptionButton optionjkt 
         BackColor       =   &H00C0FFFF&
         Caption         =   "交款时间"
         Height          =   255
         Left            =   240
         TabIndex        =   4
         Top             =   840
         Width           =   1095
      End
      Begin VB.OptionButton Optionjkr 
         BackColor       =   &H00C0FFFF&
         Caption         =   "交款人"
         Height          =   375
         Left            =   4800
         TabIndex        =   3
         Top             =   240
         Width           =   855
      End
      Begin VB.OptionButton optionloupan 
         BackColor       =   &H00C0FFFF&
         Caption         =   "楼盘编号"
         Height          =   375
         Left            =   2520
         TabIndex        =   2
         Top             =   240
         Width           =   1095
      End
      Begin VB.OptionButton optionid 
         BackColor       =   &H00C0FFFF&
         Caption         =   "收费单号"
         Height          =   375
         Left            =   240
         TabIndex        =   1
         Top             =   240
         Width           =   1095
      End
      Begin VB.Label Label1 
         BackColor       =   &H00C0FFFF&
         Caption         =   "------"
         Height          =   255
         Left            =   2880
         TabIndex        =   10
         Top             =   840
         Width           =   615
      End
   End
End
Attribute VB_Name = "frmshoufeifind"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim rs_shoufei As New ADODB.Recordset

Private Sub cmdfind_Click()
Dim sql As String
On Error GoTo loaderror
MSHFlexGrid1.Clear
If optionid.Value = True Then
   sql = "select * from 收费 where fee_ID = " & CInt(txtshoufeinum.Text)
   rs_shoufei.CursorLocation = adUseClient
   rs_shoufei.Open sql, conn, adOpenKeyset, adLockPessimistic
   setgrid
   setgridhead
   displaygrid
   rs_shoufei.Close
   Exit Sub
End If
If optionloupan.Value = True Then
   sql = "select * from 收费 where fee_houseID = '" & txtloupannum.Text & "'"
   rs_shoufei.CursorLocation = adUseClient
   rs_shoufei.Open sql, conn, adOpenKeyset, adLockPessimistic
   setgrid
   setgridhead
   displaygrid
   rs_shoufei.Close
   Exit Sub
End If
If Optionjkr.Value = True Then
   sql = "select * from 收费 where fee_jkr = '" & txtjkr.Text & "'"
   rs_shoufei.CursorLocation = adUseClient
   rs_shoufei.Open sql, conn, adOpenKeyset, adLockPessimistic
   setgrid
   setgridhead
   displaygrid
   rs_shoufei.Close
   Exit Sub
End If
If optionjkt.Value = True Then
   sql = "select * from 收费 where Fee_date between #" & _
        DTPicker1.Value & "# and #" & DTPicker2.Value & "#"
   rs_shoufei.CursorLocation = adUseClient
   rs_shoufei.Open sql, conn, adOpenKeyset, adLockPessimistic
   setgrid
   setgridhead
   displaygrid
   rs_shoufei.Close
   Exit Sub
End If
Exit Sub
loaderror:
   MsgBox Err.Description

End Sub

Private Sub cmdprint_Click()
Printgrid1.Unit = Centimeter
Printgrid1.PrintObject = MSHFlexGrid1
Printgrid1.DoPreView
End Sub

Private Sub cmdexit_Click()
Unload Me
End Sub

Private Sub Form_Load()
Dim sql As String
On Error GoTo loaderror
sql = "select * from 收费"
rs_shoufei.CursorLocation = adUseClient
rs_shoufei.Open sql, conn, adOpenKeyset, adLockPessimistic
setgrid
setgridhead
displaygrid
rs_shoufei.Close
Exit Sub
loaderror:
   MsgBox Err.Description
End Sub
Public Sub displaygrid()
Dim i As Integer
Dim j As Integer
On Error GoTo displayerror
MSHFlexGrid1.Row = 0
If Not rs_shoufei.EOF Then
   rs_shoufei.MoveFirst
   Do While Not rs_shoufei.EOF
            MSHFlexGrid1.Row = MSHFlexGrid1.Row + 1
            For j = 0 To 10
                MSHFlexGrid1.Col = j
                If Not IsNull(rs_shoufei.Fields(j)) Then MSHFlexGrid1.Text = _
                   rs_shoufei.Fields(j) Else MSHFlexGrid1.Text = ""
            Next j
            rs_shoufei.MoveNext
   Loop
End If
displayerror:
If Err.Number <> 0 Then
   MsgBox Err.Description
End If
End Sub

Public Sub setgrid()
Dim i As Integer
On Error GoTo seterror
With MSHFlexGrid1
    .ScrollBars = flexScrollBarBoth
    .FixedCols = 1
    .Rows = rs_shoufei.RecordCount + 1
    .Cols = 12
    .SelectionMode = flexSelectionByRow
For i = 0 To .Rows - 1
    .RowHeight(i) = 315
Next
For i = 0 To .Cols - 1
    .ColWidth(i) = 1500
Next i
End With
Exit Sub
seterror:
     MsgBox Err.Description
End Sub

Public Sub setgridhead()
On Error GoTo setheaderror
MSHFlexGrid1.Row = 0
MSHFlexGrid1.Col = 0
MSHFlexGrid1.Text = "收费编号"
MSHFlexGrid1.Col = 1
MSHFlexGrid1.Text = "楼盘编号"
MSHFlexGrid1.Col = 2
MSHFlexGrid1.Text = "交费时间"
MSHFlexGrid1.Col = 3
MSHFlexGrid1.Text = "有线电视"
MSHFlexGrid1.Col = 4
MSHFlexGrid1.Text = "电话调试"
MSHFlexGrid1.Col = 5
MSHFlexGrid1.Text = "煤气初装"
MSHFlexGrid1.Col = 6
MSHFlexGrid1.Text = "公用设施"
MSHFlexGrid1.Col = 7
MSHFlexGrid1.Text = "其他费用"
MSHFlexGrid1.Col = 8
MSHFlexGrid1.Text = "押金"
MSHFlexGrid1.Col = 9
MSHFlexGrid1.Text = "合计"
MSHFlexGrid1.Col = 10
MSHFlexGrid1.Text = "收款人"
MSHFlexGrid1.Col = 11
MSHFlexGrid1.Text = "交款人"
Exit Sub
setheaderror:
   MsgBox Err.Description
End Sub


⌨️ 快捷键说明

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