📄 frm_tj.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frm_TJ
Caption = "客户数据分析管理"
ClientHeight = 1560
ClientLeft = 60
ClientTop = 345
ClientWidth = 3345
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
ScaleHeight = 1560
ScaleWidth = 3345
Begin MSAdodcLib.Adodc Adodc3
Height = 375
Left = 1560
Top = 3360
Width = 1815
_ExtentX = 3201
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=ljm"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=ljm"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from Table_KHZL"
Caption = "Adodc3"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSAdodcLib.Adodc Adodc2
Height = 375
Left = 1560
Top = 2880
Width = 1815
_ExtentX = 3201
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=ljm"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=ljm"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from Table_TJ"
Caption = "Adodc2"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.TextBox Text3
Height = 375
Left = 360
TabIndex = 5
Text = "111"
Top = 2880
Width = 975
End
Begin VB.TextBox Text1
Height = 375
Left = 360
TabIndex = 4
Text = "Text1"
Top = 2400
Width = 975
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 960
Top = 1920
Width = 2415
_ExtentX = 4260
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=ljm"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=ljm"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from Table_KHZL"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 2400
TabIndex = 3
Top = 1080
Width = 855
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 1440
TabIndex = 2
Top = 1080
Width = 855
End
Begin VB.Frame Frame1
Caption = "请选择所要统计的客户数据"
Height = 735
Left = 360
TabIndex = 0
Top = 240
Width = 2895
Begin VB.ComboBox Combo1
Height = 300
ItemData = "frm_TJ.frx":0000
Left = 240
List = "frm_TJ.frx":0019
TabIndex = 1
Text = "购买意向"
Top = 240
Width = 2415
End
End
End
Attribute VB_Name = "frm_TJ"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public adoCon As New ADODB.Connection
Public adoRs As New ADODB.Recordset
Private Sub Command1_Click()
Set adoCon = New ADODB.Connection
adoCon.Open "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=ljm"
Adodc2.RecordSource = "select * from Table_TJ"
Adodc2.Refresh
If Adodc2.Recordset.RecordCount > 0 Then
Adodc2.Recordset.MoveFirst
Do While Adodc2.Recordset.EOF = False
Adodc2.Recordset.Delete
Adodc2.Recordset.MoveNext
Loop
Else
End If
Adodc1.RecordSource = "select " + Combo1.Text + " from Table_KHZL "
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.MoveFirst
Do While Adodc1.Recordset.EOF = False
If Trim(Text1.Text) = Trim(Adodc1.Recordset.Fields(Combo1.Text)) Then
Adodc1.Recordset.MoveNext
ElseIf Trim(Text1.Text) <> Trim(Adodc1.Recordset.Fields(Combo1.Text)) Then
Text1.Text = Adodc1.Recordset.Fields(Combo1.Text)
Adodc3.RecordSource = "select " + Combo1.Text + " from Table_KHZL where " + Combo1.Text + "='" + Text1.Text + "'"
Adodc3.Refresh
Text3.Text = Val(Text3.Text) + 1
Set adoRs = adoCon.Execute("insert into Table_TJ values(" & Text3 & ",'" & Text1 & "','" & Adodc3.Recordset.RecordCount & "')")
Adodc1.Recordset.MoveNext
Else
End If
Loop
MsgBox "数据统计成功完成!!", 64, "房地产销售管理系统"
frm_KHSJFX.Show
MDI_main.Toolbar1.Visible = False
frm_KHSJFX.Left = 1200
frm_KHSJFX.Top = 920
Else
MsgBox "数据库中没有所要统计的数据", 32, "房地产销售管理系统"
End If
End Sub
Private Sub Command2_Click()
Unload Me
MDI_main.Toolbar1.Visible = True
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload Me
MDI_main.Toolbar1.Visible = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -