📄 frm_khcx.frm
字号:
VERSION 5.00
Begin VB.Form frm_KHCX
BorderStyle = 3 'Fixed Dialog
Caption = "信息查询管理"
ClientHeight = 1410
ClientLeft = 45
ClientTop = 330
ClientWidth = 5760
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 1410
ScaleWidth = 5760
ShowInTaskbar = 0 'False
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 4800
TabIndex = 2
Top = 960
Width = 855
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 3720
TabIndex = 1
Top = 960
Width = 975
End
Begin VB.Frame Frame1
Height = 735
Left = 120
TabIndex = 0
Top = 120
Width = 5535
Begin VB.TextBox Text1
Height = 300
Left = 3000
TabIndex = 5
Top = 240
Width = 2295
End
Begin VB.ComboBox Combo2
Height = 315
ItemData = "frm_KHCX.frx":0000
Left = 1920
List = "frm_KHCX.frx":0016
Style = 2 'Dropdown List
TabIndex = 4
Top = 240
Width = 975
End
Begin VB.ComboBox Combo1
Height = 315
ItemData = "frm_KHCX.frx":0037
Left = 240
List = "frm_KHCX.frx":0039
Style = 2 'Dropdown List
TabIndex = 3
Top = 240
Width = 1575
End
End
End
Attribute VB_Name = "frm_KHCX"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i, a
Private Sub Combo1_Click()
Combo2.SetFocus
End Sub
Private Sub Combo2_Click()
If Combo2.Text = " =" Then
i = 0
ElseIf Combo2.Text = " <" Then
i = 1
ElseIf Combo2.Text = " <=" Then
i = 2
ElseIf Combo2.Text = " >" Then
i = 3
ElseIf Combo2.Text = " >=" Then
i = 4
ElseIf Combo2.Text = " Like" Then
i = 5
Else
End If
Text1.SetFocus
End Sub
Private Sub Command1_Click()
If Combo1.Text = "年龄" Or Combo1.Text = "客户编号" Or Combo1.Text = "销售单价" Or Combo1.Text = "房产总价" Or Combo1.Text = "已付金额" Or Combo1.Text = "未付金额" Or Combo1.Text = "退款单号" Or Combo1.Text = "退款金额 " Then
If Not IsNumeric(Text1.Text) Then
Text1.Text = ""
Text1.SetFocus
Exit Sub
Else
If Combo1.Text = "" Or Text1.Text = "" Then
MsgBox "选择或输入的信息不能为空值", 48, "房屋销售管理系统"
Combo1.SetFocus
Else
If Frame1.Caption = "客户资料查询" Then
a = Text1.Text
If i = 0 Then
frm_KHZLGL.Adodc1.RecordSource = "select * from Table_KHZL where " + Combo1.Text + "='" + a + "'"
frm_KHZLGL.Adodc1.Refresh
ElseIf i = 1 Then
frm_KHZLGL.Adodc1.RecordSource = "select * from Table_KHZL where " + Combo1.Text + "<'" + a + "'"
frm_KHZLGL.Adodc1.Refresh
ElseIf i = 2 Then
frm_KHZLGL.Adodc1.RecordSource = "select * from Table_KHZL where " + Combo1.Text + "<='" + a + "'"
frm_KHZLGL.Adodc1.Refresh
ElseIf i = 3 Then
frm_KHZLGL.Adodc1.RecordSource = "select * from Table_KHZL where " + Combo1.Text + ">'" + a + "'"
frm_KHZLGL.Adodc1.Refresh
ElseIf i = 4 Then
frm_KHZLGL.Adodc1.RecordSource = "select * from Table_KHZL where " + Combo1.Text + ">='" + a + "'"
frm_KHZLGL.Adodc1.Refresh
ElseIf i = 5 Then
frm_KHZLGL.Adodc1.RecordSource = "select * from Table_KHZL where " + Combo1.Text + " like '%" + a + "%'"
frm_KHZLGL.Adodc1.Refresh
Else
End If
frm_KHCX.Hide
ElseIf Frame1.Caption = "客户房屋购订资料查询" Then
a = Text1.Text
If i = 0 Then
frm_KHZLGL.Adodc6.RecordSource = "select * from Table_FWXX where " + Combo1.Text + "='" + a + "'"
frm_KHZLGL.Adodc6.Refresh
ElseIf i = 1 Then
frm_KHZLGL.Adodc6.RecordSource = "select * from Table_FWXX where " + Combo1.Text + "<'" + a + "'"
frm_KHZLGL.Adodc6.Refresh
ElseIf i = 2 Then
frm_KHZLGL.Adodc6.RecordSource = "select * from Table_FWXX where " + Combo1.Text + "<='" + a + "'"
frm_KHZLGL.Adodc6.Refresh
ElseIf i = 3 Then
frm_KHZLGL.Adodc6.RecordSource = "select * from Table_FWXX where " + Combo1.Text + ">'" + a + "'"
frm_KHZLGL.Adodc6.Refresh
ElseIf i = 4 Then
frm_KHZLGL.Adodc6.RecordSource = "select * from Table_FWXX where " + Combo1.Text + ">='" + a + "'"
frm_KHZLGL.Adodc6.Refresh
ElseIf i = 5 Then
frm_KHZLGL.Adodc6.RecordSource = "select * from Table_FWXX where " + Combo1.Text + " like '%" + a + "%'"
frm_KHZLGL.Adodc6.Refresh
Else
End If
frm_KHCX.Hide
ElseIf Frame1.Caption = "客户房屋购订付款查询" Then
a = Text1.Text
If i = 0 Then
frm_KHZLGL.Adodc5.RecordSource = "select * from Table_khfk where " + Combo1.Text + "='" + a + "'"
frm_KHZLGL.Adodc5.Refresh
ElseIf i = 1 Then
frm_KHZLGL.Adodc5.RecordSource = "select * from Table_khfk where " + Combo1.Text + "<'" + a + "'"
frm_KHZLGL.Adodc5.Refresh
ElseIf i = 2 Then
frm_KHZLGL.Adodc5.RecordSource = "select * from Table_khfk where " + Combo1.Text + "<='" + a + "'"
frm_KHZLGL.Adodc5.Refresh
ElseIf i = 3 Then
frm_KHZLGL.Adodc5.RecordSource = "select * from Table_khfk where " + Combo1.Text + ">'" + a + "'"
frm_KHZLGL.Adodc5.Refresh
ElseIf i = 4 Then
frm_KHZLGL.Adodc5.RecordSource = "select * from Table_khfk where " + Combo1.Text + ">='" + a + "'"
frm_KHZLGL.Adodc5.Refresh
ElseIf i = 5 Then
frm_KHZLGL.Adodc5.RecordSource = "select * from Table_khfk where " + Combo1.Text + " like '%" + a + "%'"
frm_KHZLGL.Adodc5.Refresh
Else
End If
frm_KHCX.Hide
ElseIf Frame1.Caption = "客户退款查询" Then
a = Text1.Text
If i = 0 Then
frm_KHZLGL.Adodc3.RecordSource = "select * from Table_KHTK where " + Combo1.Text + "='" + a + "'"
frm_KHZLGL.Adodc3.Refresh
ElseIf i = 1 Then
frm_KHZLGL.Adodc3.RecordSource = "select * from Table_KHTK where " + Combo1.Text + "<'" + a + "'"
frm_KHZLGL.Adodc3.Refresh
ElseIf i = 2 Then
frm_KHZLGL.Adodc3.RecordSource = "select * from Table_KHTK where " + Combo1.Text + "<='" + a + "'"
frm_KHZLGL.Adodc3.Refresh
ElseIf i = 3 Then
frm_KHZLGL.Adodc3.RecordSource = "select * from Table_KHTK where " + Combo1.Text + ">'" + a + "'"
frm_KHZLGL.Adodc3.Refresh
ElseIf i = 4 Then
frm_KHZLGL.Adodc3.RecordSource = "select * from Table_KHTK where " + Combo1.Text + ">='" + a + "'"
frm_KHZLGL.Adodc3.Refresh
ElseIf i = 5 Then
frm_KHZLGL.Adodc3.RecordSource = "select * from Table_KHTK where " + Combo1.Text + " like '%" + a + "%'"
frm_KHZLGL.Adodc3.Refresh
Else
End If
frm_KHCX.Hide
Else
End If
End If
End If
Else
If Combo1.Text = "" Or Text1.Text = "" Then
MsgBox "选择或输入的信息不能为空值", 48, "房屋销售管理系统"
Combo1.SetFocus
Else
If Frame1.Caption = "客户资料查询" Then
a = Text1.Text
If i = 0 Then
frm_KHZLGL.Adodc1.RecordSource = "select * from Table_KHZL where " + Combo1.Text + "='" + a + "'"
frm_KHZLGL.Adodc1.Refresh
ElseIf i = 1 Then
frm_KHZLGL.Adodc1.RecordSource = "select * from Table_KHZL where " + Combo1.Text + "<'" + a + "'"
frm_KHZLGL.Adodc1.Refresh
ElseIf i = 2 Then
frm_KHZLGL.Adodc1.RecordSource = "select * from Table_KHZL where " + Combo1.Text + "<='" + a + "'"
frm_KHZLGL.Adodc1.Refresh
ElseIf i = 3 Then
frm_KHZLGL.Adodc1.RecordSource = "select * from Table_KHZL where " + Combo1.Text + ">'" + a + "'"
frm_KHZLGL.Adodc1.Refresh
ElseIf i = 4 Then
frm_KHZLGL.Adodc1.RecordSource = "select * from Table_KHZL where " + Combo1.Text + ">='" + a + "'"
frm_KHZLGL.Adodc1.Refresh
ElseIf i = 5 Then
frm_KHZLGL.Adodc1.RecordSource = "select * from Table_KHZL where " + Combo1.Text + " like '%" + a + "%'"
frm_KHZLGL.Adodc1.Refresh
Else
End If
frm_KHCX.Hide
ElseIf Frame1.Caption = "客户房屋购订资料查询" Then
a = Text1.Text
If i = 0 Then
frm_KHZLGL.Adodc6.RecordSource = "select * from Table_FWXX where " + Combo1.Text + "='" + a + "'"
frm_KHZLGL.Adodc6.Refresh
ElseIf i = 1 Then
frm_KHZLGL.Adodc6.RecordSource = "select * from Table_FWXX where " + Combo1.Text + "<'" + a + "'"
frm_KHZLGL.Adodc6.Refresh
ElseIf i = 2 Then
frm_KHZLGL.Adodc6.RecordSource = "select * from Table_FWXX where " + Combo1.Text + "<='" + a + "'"
frm_KHZLGL.Adodc6.Refresh
ElseIf i = 3 Then
frm_KHZLGL.Adodc6.RecordSource = "select * from Table_FWXX where " + Combo1.Text + ">'" + a + "'"
frm_KHZLGL.Adodc6.Refresh
ElseIf i = 4 Then
frm_KHZLGL.Adodc6.RecordSource = "select * from Table_FWXX where " + Combo1.Text + ">='" + a + "'"
frm_KHZLGL.Adodc6.Refresh
ElseIf i = 5 Then
frm_KHZLGL.Adodc6.RecordSource = "select * from Table_FWXX where " + Combo1.Text + " like '%" + a + "%'"
frm_KHZLGL.Adodc6.Refresh
Else
End If
frm_KHCX.Hide
ElseIf Frame1.Caption = "客户房屋购订付款查询" Then
a = Text1.Text
If i = 0 Then
frm_KHZLGL.Adodc5.RecordSource = "select * from Table_khfk where " + Combo1.Text + "='" + a + "'"
frm_KHZLGL.Adodc5.Refresh
ElseIf i = 1 Then
frm_KHZLGL.Adodc5.RecordSource = "select * from Table_khfk where " + Combo1.Text + "<'" + a + "'"
frm_KHZLGL.Adodc5.Refresh
ElseIf i = 2 Then
frm_KHZLGL.Adodc5.RecordSource = "select * from Table_khfk where " + Combo1.Text + "<='" + a + "'"
frm_KHZLGL.Adodc5.Refresh
ElseIf i = 3 Then
frm_KHZLGL.Adodc5.RecordSource = "select * from Table_khfk where " + Combo1.Text + ">'" + a + "'"
frm_KHZLGL.Adodc5.Refresh
ElseIf i = 4 Then
frm_KHZLGL.Adodc5.RecordSource = "select * from Table_khfk where " + Combo1.Text + ">='" + a + "'"
frm_KHZLGL.Adodc5.Refresh
ElseIf i = 5 Then
frm_KHZLGL.Adodc5.RecordSource = "select * from Table_khfk where " + Combo1.Text + " like '%" + a + "%'"
frm_KHZLGL.Adodc5.Refresh
Else
End If
frm_KHCX.Hide
ElseIf Frame1.Caption = "客户退款查询" Then
a = Text1.Text
If i = 0 Then
frm_KHZLGL.Adodc3.RecordSource = "select * from Table_KHTK where " + Combo1.Text + "='" + a + "'"
frm_KHZLGL.Adodc3.Refresh
ElseIf i = 1 Then
frm_KHZLGL.Adodc3.RecordSource = "select * from Table_KHTK where " + Combo1.Text + "<'" + a + "'"
frm_KHZLGL.Adodc3.Refresh
ElseIf i = 2 Then
frm_KHZLGL.Adodc3.RecordSource = "select * from Table_KHTK where " + Combo1.Text + "<='" + a + "'"
frm_KHZLGL.Adodc3.Refresh
ElseIf i = 3 Then
frm_KHZLGL.Adodc3.RecordSource = "select * from Table_KHTK where " + Combo1.Text + ">'" + a + "'"
frm_KHZLGL.Adodc3.Refresh
ElseIf i = 4 Then
frm_KHZLGL.Adodc3.RecordSource = "select * from Table_KHTK where " + Combo1.Text + ">='" + a + "'"
frm_KHZLGL.Adodc3.Refresh
ElseIf i = 5 Then
frm_KHZLGL.Adodc3.RecordSource = "select * from Table_KHTK where " + Combo1.Text + " like '%" + a + "%'"
frm_KHZLGL.Adodc3.Refresh
Else
End If
frm_KHCX.Hide
Else
End If
End If
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
Call Command1_Click
Else
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -