?? main_jcfx_xlfx.frm
字號:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Object = "{65E121D4-0C60-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCHRT20.OCX"
Begin VB.Form main_jcfx_xlfx
BorderStyle = 3 'Fixed Dialog
Caption = "決策分析-【圖書銷量分析】"
ClientHeight = 8145
ClientLeft = 1080
ClientTop = 810
ClientWidth = 11880
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
PaletteMode = 1 'UseZOrder
ScaleHeight = 8145
ScaleWidth = 11880
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin MSChart20Lib.MSChart msChart1
CausesValidation= 0 'False
Height = 5895
Left = 120
OleObjectBlob = "main_jcfx_xlfx.frx":0000
TabIndex = 0
Top = 720
Width = 11625
End
Begin VB.Frame Frame1
Caption = "銷售排行列表"
Height = 1275
Left = 120
TabIndex = 2
Top = 6675
Width = 11655
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "main_jcfx_xlfx.frx":1A52
Height = 975
Left = 120
TabIndex = 3
Top = 225
Width = 11415
_ExtentX = 20135
_ExtentY = 1720
_Version = 393216
HeadLines = 1
RowHeight = 14
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
End
Begin VB.Frame Frame2
Height = 675
Left = 60
TabIndex = 4
Top = 30
Width = 8295
Begin MSDataListLib.DataCombo DataCombo1
Bindings = "main_jcfx_xlfx.frx":1A67
Height = 330
Left = 1785
TabIndex = 6
Top = 225
Width = 5895
_ExtentX = 10398
_ExtentY = 582
_Version = 393216
ListField = "類別名稱"
Text = "計算機類"
End
Begin VB.Label Label1
Caption = "選擇圖書類別"
Height = 255
Left = 600
TabIndex = 5
Top = 285
Width = 1215
End
End
Begin VB.CommandButton Command1
Caption = "退出"
Height = 435
Left = 8460
TabIndex = 1
Top = 195
Width = 3225
End
Begin MSAdodcLib.Adodc Adodc2
Height = 330
Left = 0
Top = 0
Visible = 0 'False
Width = 2025
_ExtentX = 3572
_ExtentY = 582
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= 3
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "DSN=NBooks"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "NBooks"
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from tslbb"
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 MSAdodcLib.Adodc Adodc1
Height = 330
Left = 0
Top = 0
Visible = 0 'False
Width = 2025
_ExtentX = 3572
_ExtentY = 582
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= 3
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "DSN=NBooks"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "NBooks"
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from xsb"
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
End
Attribute VB_Name = "main_jcfx_xlfx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs1 As New ADODB.Recordset
Private Sub Form_Load()
Set rs1 = New ADODB.Recordset
rs1.Open "select top 20 書名,sum(銷售數(shù)量) as 合計銷售數(shù)量 from xsb where 圖書類別='" + DataCombo1.text + "'and left(日期,7)='" + Left(Date, 7) + "'group by 書名,出版社 order by 2 desc", Cnn, adOpenKeyset, adLockOptimistic
With msChart1
.ShowLegend = True
.Title.text = " " & Year(Date) & "年" & Month(Date) & "月份 " & DataCombo1.text & "圖書銷量排行(前20名) " '設(shè)置圖表名稱
.Title.VtFont.Size = 12 '設(shè)置字體大小
.Title.VtFont.VtColor.Set 255, 0, 0 '設(shè)置字體顏色
End With
Set msChart1.DataSource = rs1
If rs1.RecordCount > 0 Then
rs1.MoveFirst
Set msChart1.DataSource = rs1
msChart1.ColumnLabel = "本月圖書銷售數(shù)量"
End If
rs1.Close
Adodc1.RecordSource = "select top 20 書名,條形碼,作者,出版社,sum(銷售數(shù)量) as 合計數(shù)量 from xsb where 圖書類別='" + DataCombo1.text + "' and left(日期,7)='" + Left(Date, 7) + "' group by 書名,條形碼,作者,出版社 order by 5 desc"
Adodc1.Refresh
DataGrid1.Columns(0).Width = 4500
DataGrid1.Columns(1).Width = 1500
DataGrid1.Columns(2).Width = 1500
DataGrid1.Columns(3).Width = 2000
DataGrid1.Columns(4).Width = 1200
End Sub
Private Sub DataCombo1_Click(Area As Integer)
Form_Load
End Sub
Private Sub Command1_Click()
frm_main.Enabled = True
Unload Me
End Sub
Private Sub Form_Unload(Cancel As Integer)
frm_main.Enabled = True
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -