frm_query.frm
资源名称:jtlc.rar [点击查看]
上传用户:xxdyjx888
上传日期:2022-06-01
资源大小:55k
文件大小:18k
源码类别:
家庭/个人应用
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
- Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomct2.ocx"
- Object = "{0ECD9B60-23AA-11D0-B351-00A0C9055D8E}#6.0#0"; "MSHFLXGD.OCX"
- Begin VB.Form frm_query
- Caption = "查询"
- ClientHeight = 6585
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 7305
- Icon = "frm_query.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 6585
- ScaleWidth = 7305
- StartUpPosition = 2 'CenterScreen
- Begin TabDlg.SSTab SSTab1
- Height = 6615
- Left = 0
- TabIndex = 0
- Top = 0
- Width = 7335
- _ExtentX = 12938
- _ExtentY = 11668
- _Version = 393216
- Tabs = 2
- TabHeight = 520
- TabCaption(0) = "日常收入"
- TabPicture(0) = "frm_query.frx":030A
- Tab(0).ControlEnabled= -1 'True
- Tab(0).Control(0)= "Label3"
- Tab(0).Control(0).Enabled= 0 'False
- Tab(0).Control(1)= "Label1"
- Tab(0).Control(1).Enabled= 0 'False
- Tab(0).Control(2)= "Label2"
- Tab(0).Control(2).Enabled= 0 'False
- Tab(0).Control(3)= "DTPicker1"
- Tab(0).Control(3).Enabled= 0 'False
- Tab(0).Control(4)= "Combo2"
- Tab(0).Control(4).Enabled= 0 'False
- Tab(0).Control(5)= "Combo1"
- Tab(0).Control(5).Enabled= 0 'False
- Tab(0).Control(6)= "Chk_project"
- Tab(0).Control(6).Enabled= 0 'False
- Tab(0).Control(7)= "Chk_money"
- Tab(0).Control(7).Enabled= 0 'False
- Tab(0).Control(8)= "Chk_mode"
- Tab(0).Control(8).Enabled= 0 'False
- Tab(0).Control(9)= "Chk_date"
- Tab(0).Control(9).Enabled= 0 'False
- Tab(0).Control(10)= "Command1"
- Tab(0).Control(10).Enabled= 0 'False
- Tab(0).Control(11)= "Command2"
- Tab(0).Control(11).Enabled= 0 'False
- Tab(0).Control(12)= "MSHFlexGrid1"
- Tab(0).Control(12).Enabled= 0 'False
- Tab(0).Control(13)= "DTPicker2"
- Tab(0).Control(13).Enabled= 0 'False
- Tab(0).Control(14)= "txt_money"
- Tab(0).Control(14).Enabled= 0 'False
- Tab(0).ControlCount= 15
- TabCaption(1) = "日常支出"
- TabPicture(1) = "frm_query.frx":0326
- Tab(1).ControlEnabled= 0 'False
- Tab(1).Control(0)= "MSHFlexGrid2"
- Tab(1).Control(1)= "Combo3"
- Tab(1).Control(2)= "Chk_project1"
- Tab(1).Control(3)= "Command4"
- Tab(1).Control(4)= "Command3"
- Tab(1).Control(5)= "Chk_date1"
- Tab(1).Control(6)= "Chk_mode1"
- Tab(1).Control(7)= "Chk_money1"
- Tab(1).Control(8)= "Combo4"
- Tab(1).Control(9)= "txt_money1"
- Tab(1).Control(10)= "DTPicker3"
- Tab(1).Control(11)= "DTPicker4"
- Tab(1).Control(12)= "Label6"
- Tab(1).Control(13)= "Label5"
- Tab(1).Control(14)= "Label4"
- Tab(1).ControlCount= 15
- Begin VB.TextBox txt_money
- Height = 300
- Left = 2280
- TabIndex = 30
- Top = 2040
- Width = 1335
- End
- Begin MSComCtl2.DTPicker DTPicker2
- Height = 300
- Left = 3960
- TabIndex = 29
- Top = 600
- Width = 1335
- _ExtentX = 2355
- _ExtentY = 529
- _Version = 393216
- Format = 64487425
- CurrentDate = 37807
- End
- Begin MSHierarchicalFlexGridLib.MSHFlexGrid MSHFlexGrid1
- Height = 2535
- Left = 120
- TabIndex = 28
- Top = 3240
- Width = 7095
- _ExtentX = 12515
- _ExtentY = 4471
- _Version = 393216
- _NumberOfBands = 1
- _Band(0).Cols = 2
- End
- Begin MSHierarchicalFlexGridLib.MSHFlexGrid MSHFlexGrid2
- Height = 2535
- Left = -74880
- TabIndex = 27
- Top = 3240
- Width = 7095
- _ExtentX = 12515
- _ExtentY = 4471
- _Version = 393216
- AllowUserResizing= 1
- _NumberOfBands = 1
- _Band(0).Cols = 2
- End
- Begin VB.ComboBox Combo3
- Height = 315
- ItemData = "frm_query.frx":0342
- Left = -72720
- List = "frm_query.frx":0349
- Style = 2 'Dropdown List
- TabIndex = 26
- Top = 1320
- Width = 1335
- End
- Begin VB.CheckBox Chk_project1
- Caption = "按项目"
- Height = 255
- Left = -74640
- TabIndex = 25
- Top = 2760
- Width = 1455
- End
- Begin VB.CommandButton Command4
- Caption = "关闭"
- Height = 375
- Left = -71400
- TabIndex = 24
- Top = 6000
- Width = 735
- End
- Begin VB.CommandButton Command3
- Caption = "查询"
- Height = 375
- Left = -72120
- TabIndex = 23
- Top = 6000
- Width = 735
- End
- Begin VB.CommandButton Command2
- Caption = "关闭"
- Height = 375
- Left = 3600
- TabIndex = 22
- Top = 6000
- Width = 735
- End
- Begin VB.CommandButton Command1
- Caption = "查询"
- Height = 375
- Left = 2880
- TabIndex = 21
- Top = 6000
- Width = 735
- End
- Begin VB.CheckBox Chk_date1
- Caption = "按日期"
- Height = 255
- Left = -74640
- TabIndex = 17
- Top = 600
- Width = 975
- End
- Begin VB.CheckBox Chk_mode1
- Caption = "按方式"
- Height = 255
- Left = -74640
- TabIndex = 14
- Top = 1320
- Width = 1335
- End
- Begin VB.CheckBox Chk_money1
- Caption = "按金额"
- Height = 255
- Left = -74640
- TabIndex = 13
- Top = 2040
- Width = 1335
- End
- Begin VB.ComboBox Combo4
- Height = 315
- Left = -72720
- Style = 2 'Dropdown List
- TabIndex = 12
- Top = 2760
- Width = 1335
- End
- Begin VB.TextBox txt_money1
- Height = 300
- Left = -72720
- TabIndex = 11
- Top = 2040
- Width = 1335
- End
- Begin VB.CheckBox Chk_date
- Caption = "按日期"
- Height = 255
- Left = 360
- TabIndex = 8
- Top = 600
- Width = 975
- End
- Begin VB.CheckBox Chk_mode
- Caption = "按方式"
- Height = 255
- Left = 360
- TabIndex = 5
- Top = 1320
- Width = 1335
- End
- Begin VB.CheckBox Chk_money
- Caption = "按金额"
- Height = 255
- Left = 360
- TabIndex = 4
- Top = 2040
- Width = 1335
- End
- Begin VB.CheckBox Chk_project
- Caption = "按项目"
- Height = 255
- Left = 360
- TabIndex = 3
- Top = 2760
- Width = 1455
- End
- Begin VB.ComboBox Combo1
- Height = 315
- ItemData = "frm_query.frx":0353
- Left = 2280
- List = "frm_query.frx":035A
- Style = 2 'Dropdown List
- TabIndex = 2
- Top = 1320
- Width = 1335
- End
- Begin VB.ComboBox Combo2
- Height = 315
- Left = 2280
- Style = 2 'Dropdown List
- TabIndex = 1
- Top = 2760
- Width = 1335
- End
- Begin MSComCtl2.DTPicker DTPicker1
- Height = 300
- Left = 2280
- TabIndex = 7
- Top = 600
- Width = 1335
- _ExtentX = 2355
- _ExtentY = 529
- _Version = 393216
- Format = 64487425
- CurrentDate = 37836
- End
- Begin MSComCtl2.DTPicker DTPicker3
- Height = 300
- Left = -72720
- TabIndex = 15
- Top = 600
- Width = 1335
- _ExtentX = 2355
- _ExtentY = 529
- _Version = 393216
- Format = 64487425
- CurrentDate = 37836
- End
- Begin MSComCtl2.DTPicker DTPicker4
- Height = 300
- Left = -71040
- TabIndex = 16
- Top = 600
- Width = 1335
- _ExtentX = 2355
- _ExtentY = 529
- _Version = 393216
- Format = 64487425
- CurrentDate = 37836
- End
- Begin VB.Label Label6
- Caption = "元"
- Height = 255
- Left = -71280
- TabIndex = 20
- Top = 2040
- Width = 255
- End
- Begin VB.Label Label5
- Caption = "到"
- Height = 255
- Left = -71280
- TabIndex = 19
- Top = 600
- Width = 255
- End
- Begin VB.Label Label4
- Caption = "从"
- Height = 255
- Left = -72960
- TabIndex = 18
- Top = 600
- Width = 375
- End
- Begin VB.Label Label2
- Caption = "到"
- Height = 255
- Left = 3720
- TabIndex = 10
- Top = 600
- Width = 255
- End
- Begin VB.Label Label1
- Caption = "从"
- Height = 255
- Left = 2040
- TabIndex = 9
- Top = 600
- Width = 375
- End
- Begin VB.Label Label3
- Caption = "元"
- Height = 255
- Left = 3720
- TabIndex = 6
- Top = 2040
- Width = 375
- End
- End
- End
- Attribute VB_Name = "frm_query"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim Mydb As New ADODB.Recordset
- Dim Mydb1 As New ADODB.Recordset
- Dim Mydb2 As New ADODB.Recordset
- Dim Mydb3 As New ADODB.Recordset
- Dim Mydb4 As New ADODB.Recordset
- Dim Mydb5 As New ADODB.Recordset
- Dim Mydb10 As New ADODB.Recordset
- Dim Mydb11 As New ADODB.Recordset
- Dim Mydb12 As New ADODB.Recordset
- Dim Str_text As String
- Dim Riqi, Riqi1, Riqi3, Riqi4
- Private Sub Chk_date1_Click()
- If Chk_date1.Value = 1 Then
- Chk_mode1.Value = 0
- Chk_money1.Value = 0
- Chk_project1.Value = 0
- End If
- End Sub
- Private Sub Chk_mode1_Click()
- If Chk_mode1.Value = 1 Then
- Chk_money1.Value = 0
- Chk_project1.Value = 0
- Chk_date1.Value = 0
- End If
- End Sub
- Private Sub Chk_money1_Click()
- If Chk_money1.Value = 1 Then
- Chk_mode1.Value = 0
- Chk_project1.Value = 0
- Chk_date1.Value = 0
- End If
- End Sub
- Private Sub Chk_project1_Click()
- If Chk_project1.Value = 1 Then
- Chk_mode1.Value = 0
- Chk_date1.Value = 0
- Chk_money1.Value = 0
- End If
- End Sub
- Private Sub Command1_Click()
- If Chk_date.Value = 1 Then
- Call Criqi
- End If
- If Chk_mode.Value = 1 Then
- Call Mode
- End If
- If Chk_money = 1 Then
- Call Money
- End If
- If Chk_project.Value = 1 Then
- Call Project
- End If
- End Sub
- Private Sub Command2_Click()
- Unload Me
- End Sub
- Private Sub Command3_Click()
- If Chk_date1.Value = 1 Then
- Call Criqi1
- End If
- If Chk_mode1.Value = 1 Then
- Call Mode1
- End If
- If Chk_money1 = 1 Then
- Call Money1
- End If
- If Chk_project1.Value = 1 Then
- Call Project1
- End If
- End Sub
- Private Sub Command4_Click()
- Unload Me
- End Sub
- Private Function Criqi()
- Riqi = Format(DTPicker1.Value, "yyyy-mm-dd")
- Riqi1 = Format(DTPicker2.Value, "yyyy-mm-dd")
- Set Mydb = ExeCutesql("select * from 收入 where 日期 between '" & Riqi & "'and '" & Riqi1 & "'", Str_text)
- Set MSHFlexGrid1.DataSource = Mydb
- End Function
- Private Function Mode()
- Set Mydb1 = ExeCutesql("select * from 收入 where 方式='" & Combo1.Text & "'", Str_text)
- Set MSHFlexGrid1.DataSource = Mydb1
- End Function
- Private Function Money()
- On Error Resume Next
- Set Mydb2 = ExeCutesql("select * from 收入 where 金额=" & txt_money.Text, Str_text)
- Set MSHFlexGrid1.DataSource = Mydb2
- End Function
- Private Function Project()
- Set Mydb3 = ExeCutesql("select * from 收入 where 项目='" & Combo2.Text & "'", Str_text)
- Set MSHFlexGrid1.DataSource = Mydb3
- End Function
- Private Sub Form_Load()
- On Error Resume Next
- Dim A, B
- Set Mydb4 = ExeCutesql("select * from 收入项目", Str_text)
- A = Mydb4.RecordCount
- For I = 1 To A
- Combo2.AddItem Mydb4.Fields(0)
- Mydb4.MoveNext
- If Mydb4.EOF Then Exit For
- Next I
- Set Mydb5 = ExeCutesql("select * from 支出项目", Str_text)
- B = Mydb5.RecordCount
- For I = 1 To B
- Combo4.AddItem Mydb5.Fields(0)
- Mydb5.MoveNext
- If Mydb5.EOF Then Exit For
- Next I
- DTPicker1.Value = Date
- DTPicker2.Value = Date
- DTPicker3.Value = Date
- DTPicker4.Value = Date
- End Sub
- Private Function Criqi1()
- Riqi3 = Format(DTPicker3.Value, "yyyy-mm-dd")
- Riqi4 = Format(DTPicker4.Value, "yyyy-mm-dd")
- Set Mydb10 = ExeCutesql("select * from 支出 where 日期 between'" & Riqi3 & "' and '" & Riqi4 & "'", Str_text)
- Set MSHFlexGrid2.DataSource = Mydb10
- End Function
- Private Function Mode1()
- Set Mydb1 = ExeCutesql("select * from 支出 where 方式='" & Combo3.Text & "'", Str_text)
- Set MSHFlexGrid2.DataSource = Mydb1
- End Function
- Private Function Money1()
- On Error Resume Next
- Set Mydb11 = ExeCutesql("select * from 支出 where 金额=" & txt_money1.Text, Str_text)
- Set MSHFlexGrid2.DataSource = Mydb11
- End Function
- Private Function Project1()
- Set Mydb12 = ExeCutesql("select * from 支出 where 项目='" & Combo4.Text & "'", Str_text)
- Set MSHFlexGrid2.DataSource = Mydb12
- End Function
- Private Sub Chk_date_Click()
- If Chk_date.Value = 1 Then
- Chk_mode.Value = 0
- Chk_money.Value = 0
- Chk_project.Value = 0
- End If
- End Sub
- Private Sub Chk_mode_Click()
- If Chk_mode.Value = 1 Then
- Chk_money.Value = 0
- Chk_project.Value = 0
- Chk_date.Value = 0
- End If
- End Sub
- Private Sub Chk_money_Click()
- If Chk_money.Value = 1 Then
- Chk_mode.Value = 0
- Chk_project.Value = 0
- Chk_date.Value = 0
- End If
- End Sub
- Private Sub Chk_project_Click()
- If Chk_project.Value = 1 Then
- Chk_mode.Value = 0
- Chk_date.Value = 0
- Chk_money.Value = 0
- End If
- End Sub