📄 form11.frm
字号:
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSAdodcLib.Adodc Adodc3
Height = 375
Left = 7920
Top = 0
Visible = 0 'False
Width = 3615
_ExtentX = 6376
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "楷体_GB2312"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSAdodcLib.Adodc Adodc4
Height = 375
Left = 0
Top = 360
Visible = 0 'False
Width = 3615
_ExtentX = 6376
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "楷体_GB2312"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "客户名称"
Height = 375
Left = 720
TabIndex = 26
Top = 600
Width = 1575
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "开始时间:"
Height = 375
Left = 720
TabIndex = 25
Top = 1380
Width = 1575
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "省 份"
Height = 375
Left = 720
TabIndex = 24
Top = 2160
Width = 1575
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "城 市"
Height = 375
Left = 6240
TabIndex = 23
Top = 2160
Width = 1575
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "购买次数"
Height = 375
Left = 720
TabIndex = 22
Top = 3000
Width = 1575
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "结束时间:"
Height = 375
Left = 6240
TabIndex = 21
Top = 1440
Width = 1575
End
End
Attribute VB_Name = "Form11"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Text6 = "" And Text2 = "" Then
Adodc4.RecordSource = "select a.khmc,b.sf,b.cs,c.cpmc,c.gg,c.sl,a.xssj,a.gmcs from xsqk a,khzl b ,xsmx c where a.khmc like'" & Text7 & "'and a.xssj<'" & Text3 & "'and b.sf like'" & Text9 & "'and b.cs like'" & Text11 & "'and a.khmc=b.khmc and a.xsid=c.xsid and a.khid like'" & Form1.Text7 & "'group by a.khmc,b.sf,b.cs,c.cpmc,c.gg,c.sl,a.xssj,a.gmcs"
Adodc4.Refresh
Set DataGrid1.DataSource = Adodc4
End If
If Text6 = "" And Text2 <> "" Then
Adodc4.RecordSource = "select a.khmc,b.sf,b.cs,c.cpmc,c.gg,c.sl,a.xssj,a.gmcs from xsqk a,khzl b ,xsmx c where a.khmc like'" & Text7 & "'and a.xssj between '" & Text3 & "'and '" & Text2 & "'and b.sf like'" & Text9 & "'and b.cs like'" & Text11 & "'and a.khmc=b.khmc and a.xsid=c.xsid and a.khid like'" & Form1.Text7 & "'group by a.khmc,b.sf,b.cs,c.cpmc,c.gg,c.sl,a.xssj,a.gmcs"
Adodc4.Refresh
Set DataGrid1.DataSource = Adodc4
End If
If Text6 <> "" And Text2 <> "" Then
Adodc4.RecordSource = "select a.khmc,b.sf,b.cs,c.cpmc,c.gg,c.sl,a.xssj,a.gmcs from xsqk a,khzl b ,xsmx c where a.khmc like'" & Text7 & "'and a.xssj between '" & Text3 & "'and '" & Text2 & "'and a.gmcs like'" & Text12 & "'and b.sf like'" & Text9 & "'and b.cs like'" & Text11 & "'and a.khmc=b.khmc and a.xsid=c.xsid and a.khid like'" & Form1.Text7 & "'group by a.khmc,b.sf,b.cs,c.cpmc,c.gg,c.sl,a.xssj,a.gmcs"
Adodc4.Refresh
Set DataGrid1.DataSource = Adodc4
End If
If Text6 <> "" And Text2 = "" Then
Adodc4.RecordSource = "select a.khmc,b.sf,b.cs,c.cpmc,c.gg,c.sl,a.xssj,a.gmcs from xsqk a,khzl b ,xsmx c where a.khmc like'" & Text7 & "'and a.xssj<'" & Text3 & "'and a.gmcs like'" & Text12 & "'and b.sf like'" & Text9 & "'and b.cs like'" & Text11 & "'and a.khmc=b.khmc and a.xsid=c.xsid and a.khid like'" & Form1.Text7 & "'group by a.khmc,b.sf,b.cs,c.cpmc,c.gg,c.sl,a.xssj,a.gmcs"
Adodc4.Refresh
Set DataGrid1.DataSource = Adodc4
End If
End Sub
Private Sub Command2_Click()
Unload Form11
End Sub
Private Sub Command3_Click()
Adodc2.RecordSource = "select sf from khzl where sf<>''and sf<>'*'group by sf "
Adodc2.Refresh
Set DataGrid2.DataSource = Adodc2
Set Text4.DataSource = Adodc2
DataGrid2.Visible = True
Text4.DataField = "sf"
End Sub
Private Sub Command4_Click()
Adodc1.RecordSource = "SELECT khmc from khzl where id like'" & Form1.Text7 & "'and khmc like'" & Text7.Text & "'and khmc<>''group by khmc"
Adodc1.Refresh
Set DataGrid4.DataSource = Adodc1
Set Text1.DataSource = Adodc1
Text1.DataField = "khmc"
DataGrid4.Visible = True
End Sub
Private Sub Command5_Click()
If Text4 = "" Then
Adodc3.RecordSource = "select cs from khzl where cs<>''and cs<>'*' group by cs"
Set DataGrid3.DataSource = Adodc3
Set Text5.DataSource = Adodc3
Text5.DataField = "cs"
DataGrid3.Visible = True
Else
Adodc3.RecordSource = "select cs from khzl where sf like '" & Text4.Text & "'and cs<>''group by cs"
Set DataGrid3.DataSource = Adodc3
Set Text5.DataSource = Adodc3
Text5.DataField = "cs"
DataGrid3.Visible = True
End If
End Sub
Private Sub DataGrid2_Click()
DataGrid2.Visible = False
End Sub
Private Sub DataGrid2_LostFocus()
DataGrid2.Visible = False
End Sub
Private Sub DataGrid3_Click()
DataGrid3.Visible = False
End Sub
Private Sub DataGrid3_LostFocus()
DataGrid3.Visible = False
End Sub
Private Sub DataGrid4_Click()
DataGrid4.Visible = False
End Sub
Private Sub DataGrid4_LostFocus()
DataGrid4.Visible = False
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=SQLOLEDB.1;Password=" & Form1.Text6 & ";Persist Security Info=True;User ID=" & Form1.Text5 & ";Initial Catalog=" & Form1.Text8 & ";Data Source=" & Form1.Text4 & ""
Adodc2.ConnectionString = "Provider=SQLOLEDB.1;Password=" & Form1.Text6 & ";Persist Security Info=True;User ID=" & Form1.Text5 & ";Initial Catalog=" & Form1.Text8 & ";Data Source=" & Form1.Text4 & ""
Adodc3.ConnectionString = "Provider=SQLOLEDB.1;Password=" & Form1.Text6 & ";Persist Security Info=True;User ID=" & Form1.Text5 & ";Initial Catalog=" & Form1.Text8 & ";Data Source=" & Form1.Text4 & ""
Adodc4.ConnectionString = "Provider=SQLOLEDB.1;Password=" & Form1.Text6 & ";Persist Security Info=True;User ID=" & Form1.Text5 & ";Initial Catalog=" & Form1.Text8 & ";Data Source=" & Form1.Text4 & ""
Text3 = Date
End Sub
Private Sub Text1_Change()
Text7 = Text1 + "%"
End Sub
Private Sub Text1_Click()
DataGrid4.Visible = False
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Adodc1.RecordSource = "SELECT khmc from khzl where id like'" & Form1.Text7 & "'and khmc like'" & Text7.Text & "'and khmc<>''group by khmc"
Adodc1.Refresh
Set DataGrid4.DataSource = Adodc1
Set Text1.DataSource = Adodc1
Text1.DataField = "khmc"
DataGrid4.Visible = True
End If
End Sub
Private Sub Text2_Change()
Text8 = Text2
End Sub
Private Sub Text3_Change()
Text10 = Text3
End Sub
Private Sub Text4_Change()
Text9 = Text4
End Sub
Private Sub Text4_Click()
DataGrid2.Visible = False
End Sub
Private Sub Text5_Change()
Text11 = Text5
End Sub
Private Sub Text5_Click()
DataGrid3.Visible = False
End Sub
Private Sub Text6_Change()
Text12 = Text6
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -