?? liruntongji.frm
字號:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form liruntongji
Caption = "利潤統計"
ClientHeight = 5955
ClientLeft = 60
ClientTop = 345
ClientWidth = 10680
LinkTopic = "Form1"
ScaleHeight = 5955
ScaleWidth = 10680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "退 出"
Height = 375
Left = 5280
TabIndex = 8
Top = 600
Width = 975
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "liruntongji.frx":0000
Left = 1080
List = "liruntongji.frx":0007
TabIndex = 7
Text = "全部"
Top = 600
Width = 1815
End
Begin VB.ComboBox Combo2
Height = 300
Left = 1080
TabIndex = 6
Text = "Combo2"
Top = 120
Width = 735
End
Begin VB.ComboBox Combo3
Height = 300
Left = 2040
TabIndex = 5
Text = "Combo3"
Top = 120
Width = 615
End
Begin VB.ComboBox Combo4
Height = 300
Left = 2880
TabIndex = 4
Text = "Combo4"
Top = 120
Width = 615
End
Begin VB.ComboBox Combo5
Height = 300
Left = 3960
TabIndex = 3
Text = "Combo5"
Top = 120
Width = 735
End
Begin VB.ComboBox Combo6
Height = 300
Left = 4920
TabIndex = 2
Text = "Combo6"
Top = 120
Width = 615
End
Begin VB.ComboBox Combo7
Height = 300
Left = 5760
TabIndex = 1
Text = "Combo7"
Top = 120
Width = 615
End
Begin VB.CommandButton Command2
Caption = "統 計"
Height = 375
Left = 3360
TabIndex = 0
Top = 600
Width = 1095
End
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
Height = 4815
Left = 0
TabIndex = 9
Top = 1080
Width = 10695
_ExtentX = 18865
_ExtentY = 8493
_Version = 393216
Cols = 6
FixedCols = 5
AllowUserResizing= 3
End
Begin VB.Label Label1
Caption = "藥品名稱:"
Height = 375
Left = 0
TabIndex = 18
Top = 600
Width = 975
End
Begin VB.Label Label2
Caption = "日期范圍:"
Height = 375
Left = 0
TabIndex = 17
Top = 120
Width = 1095
End
Begin VB.Label Label3
Caption = "年"
Height = 255
Left = 1800
TabIndex = 16
Top = 240
Width = 255
End
Begin VB.Label Label4
Caption = "月"
Height = 255
Left = 2640
TabIndex = 15
Top = 240
Width = 255
End
Begin VB.Label Label5
Caption = "日"
Height = 255
Left = 3480
TabIndex = 14
Top = 240
Width = 255
End
Begin VB.Label Label6
Caption = "年"
Height = 255
Left = 4680
TabIndex = 13
Top = 240
Width = 255
End
Begin VB.Label Label7
Caption = "月"
Height = 255
Left = 5520
TabIndex = 12
Top = 240
Width = 255
End
Begin VB.Label Label8
Caption = "日"
Height = 255
Left = 6360
TabIndex = 11
Top = 240
Width = 255
End
Begin VB.Label Label9
Caption = "至"
ForeColor = &H00FF0000&
Height = 255
Left = 3720
TabIndex = 10
Top = 240
Width = 255
End
End
Attribute VB_Name = "liruntongji"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Trecordset As New ADODB.Recordset
Dim Trecordset1 As New ADODB.Recordset
Dim Trecordset2 As New ADODB.Recordset
Dim Trecordset3 As New ADODB.Recordset
Dim Trecordset4 As New ADODB.Recordset
Dim Trecordset5 As New ADODB.Recordset
Sub Initial()
'init the combobox
Combo2.Clear
Combo3.Clear
Combo4.Clear
Combo5.Clear
Combo6.Clear
Combo7.Clear
For i = 1980 To Year(Date)
Combo2.AddItem i
Combo5.AddItem i
Next
Combo2.Text = Year(Date) - 1
Combo5.Text = Year(Date)
For i = 1 To 12
Combo3.AddItem i
Combo6.AddItem i
Next
Combo3.Text = Month(Date)
Combo6.Text = Month(Date)
For i = 1 To 31
Combo4.AddItem i
Combo7.AddItem i
Next
Combo4.Text = Day(Date)
Combo7.Text = Day(Date)
'''''''''''''''''''''''''藥品名稱
With Trecordset1
Set .ActiveConnection = SGWConnection
.CursorLocation = adUseServer
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
.Source = "Select distinct yaopinming from pifa lingshou "
.Open
End With
Do While Not Trecordset1.EOF
Combo1.Text = "全部"
Combo1.AddItem Trecordset1.Fields("yaopinming")
Trecordset1.MoveNext
Loop
Trecordset1.Close
End Sub
Sub Gridflex()
'init the headers of the msflexgrid1
MSFlexGrid1.Cols = 16
MSFlexGrid1.TextMatrix(0, 0) = "編號"
MSFlexGrid1.TextMatrix(0, 1) = "單據號"
MSFlexGrid1.TextMatrix(0, 2) = "數量"
MSFlexGrid1.TextMatrix(0, 3) = "金額"
MSFlexGrid1.TextMatrix(0, 4) = "利潤"
MSFlexGrid1.TextMatrix(0, 5) = "操作員"
MSFlexGrid1.TextMatrix(0, 6) = "往來單位"
MSFlexGrid1.TextMatrix(0, 7) = "進貨時間"
MSFlexGrid1.TextMatrix(0, 8) = "藥品名稱"
MSFlexGrid1.TextMatrix(0, 9) = "包裝規格"
MSFlexGrid1.TextMatrix(0, 10) = "劑型"
MSFlexGrid1.TextMatrix(0, 11) = "藥品類型"
MSFlexGrid1.TextMatrix(0, 12) = "生產日期"
MSFlexGrid1.TextMatrix(0, 13) = "有效日期"
MSFlexGrid1.TextMatrix(0, 14) = "價格"
MSFlexGrid1.TextMatrix(0, 15) = "備注"
MSFlexGrid1.ColWidth(0) = 500
MSFlexGrid1.ColWidth(1) = 1500
MSFlexGrid1.ColWidth(2) = 900
MSFlexGrid1.ColWidth(3) = 900
MSFlexGrid1.ColWidth(4) = 900
MSFlexGrid1.ColWidth(5) = 900
MSFlexGrid1.ColWidth(6) = 1500
MSFlexGrid1.ColWidth(7) = 900
MSFlexGrid1.ColWidth(8) = 900
MSFlexGrid1.ColWidth(9) = 900
MSFlexGrid1.ColWidth(10) = 900
MSFlexGrid1.ColWidth(11) = 900
MSFlexGrid1.ColWidth(12) = 900
MSFlexGrid1.ColWidth(13) = 900
MSFlexGrid1.ColWidth(14) = 900
MSFlexGrid1.ColWidth(15) = 2000
' Trecordset3.Close
With Trecordset3
Set .ActiveConnection = SGWConnection
.CursorLocation = adUseServer
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
.Source = "Select * from pifa order by id desc"
.Open
End With
With Trecordset5
Set .ActiveConnection = SGWConnection
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -