📄 jinhuotongji.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form jinhuotongji
Caption = "进货统计"
ClientHeight = 6270
ClientLeft = 60
ClientTop = 345
ClientWidth = 11535
LinkTopic = "Form1"
ScaleHeight = 6270
ScaleWidth = 11535
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "统 计"
Height = 375
Left = 3360
TabIndex = 18
Top = 600
Width = 1095
End
Begin VB.ComboBox Combo7
Height = 300
Left = 5760
TabIndex = 10
Text = "Combo7"
Top = 120
Width = 615
End
Begin VB.ComboBox Combo6
Height = 300
Left = 4920
TabIndex = 9
Text = "Combo6"
Top = 120
Width = 615
End
Begin VB.ComboBox Combo5
Height = 300
Left = 3960
TabIndex = 8
Text = "Combo5"
Top = 120
Width = 735
End
Begin VB.ComboBox Combo4
Height = 300
Left = 2880
TabIndex = 7
Text = "Combo4"
Top = 120
Width = 615
End
Begin VB.ComboBox Combo3
Height = 300
Left = 2040
TabIndex = 6
Text = "Combo3"
Top = 120
Width = 615
End
Begin VB.ComboBox Combo2
Height = 300
Left = 1080
TabIndex = 5
Text = "Combo2"
Top = 120
Width = 735
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "jinhuotongji.frx":0000
Left = 1200
List = "jinhuotongji.frx":0002
TabIndex = 1
Text = "全部"
Top = 600
Width = 1815
End
Begin VB.CommandButton Command1
Caption = "退 出"
Height = 375
Left = 6480
TabIndex = 0
Top = 600
Width = 975
End
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
Height = 5055
Left = 0
TabIndex = 2
Top = 1200
Width = 11535
_ExtentX = 20346
_ExtentY = 8916
_Version = 393216
AllowUserResizing= 3
End
Begin VB.Label Label9
Caption = "至"
ForeColor = &H00FF0000&
Height = 255
Left = 3720
TabIndex = 17
Top = 240
Width = 255
End
Begin VB.Label Label8
Caption = "日"
Height = 255
Left = 6360
TabIndex = 16
Top = 240
Width = 255
End
Begin VB.Label Label7
Caption = "月"
Height = 255
Left = 5520
TabIndex = 15
Top = 240
Width = 255
End
Begin VB.Label Label6
Caption = "年"
Height = 255
Left = 4680
TabIndex = 14
Top = 240
Width = 255
End
Begin VB.Label Label5
Caption = "日"
Height = 255
Left = 3480
TabIndex = 13
Top = 240
Width = 255
End
Begin VB.Label Label4
Caption = "月"
Height = 255
Left = 2640
TabIndex = 12
Top = 240
Width = 255
End
Begin VB.Label Label3
Caption = "年"
Height = 255
Left = 1800
TabIndex = 11
Top = 240
Width = 255
End
Begin VB.Label Label2
Caption = "进货日期:"
Height = 375
Left = 0
TabIndex = 4
Top = 120
Width = 1095
End
Begin VB.Label Label1
Caption = "药品名称:"
Height = 375
Left = 0
TabIndex = 3
Top = 600
Width = 975
End
End
Attribute VB_Name = "jinhuotongji"
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
Dim zongshu As String, zongjine As String
Dim zongshu1 As String, zongjine1 As String
Sub dayin1()
On Error GoTo HandlePrint
Printer.ScaleMode = 6
'Printer.FontName = "SYSTEM"
If Trecordset2.RecordCount > 0 Then Trecordset2.MoveFirst
Printer.FontSize = 16
Printer.Print Tab(22); "进货统计表单"
Printer.Print Tab(19); "============================"
Printer.FontSize = 12
Printer.Print " ------------------------------------------------------------------------------------------------"
For I1 = 1 To Trecordset2.RecordCount
Printer.Print "进货号:"; Trecordset2.Fields("jinhuohao"); " 操作员:"; Trecordset2.Fields("caozuoyuan"); " 往来单位:"; Trecordset2.Fields("wanglaidanwei")
Printer.Print "药品名称:"; Trecordset2.Fields("yaopinming"); " 规格:"; Trecordset2.Fields("guige"); " 剂型:"; Trecordset2.Fields("jixing"); " 类型:"; Trecordset2.Fields("leixing")
Printer.Print "生产日期:"; Trecordset2.Fields("shengchanriqi"); " 有效期:"; Trecordset2.Fields("youxiaoqi"); " 价格:"; Trecordset2.Fields("jiage"); " 数量:"; Trecordset2.Fields("shuliang"); " 金额:"; Trecordset2.Fields("jine")
Printer.Print "备注:"; Trecordset2.Fields("beizhu")
Trecordset2.MoveNext
Next
Printer.Print "合计数量:"; Val(zongshu1); "合计总金额:"; Val(zongjine1)
Printer.Print " --------------------------------------------------------------------------------------------------"
Printer.Print " "
Printer.EndDoc
Exit Sub
HandlePrint:
MsgBox "打印出错,请检查您的计算机是否已经正确的和打印机连接!", vbOKOnly
End Sub
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)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -