?? yaopin.frm
字號:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form yaopin
BorderStyle = 1 'Fixed Single
Caption = "齊英天肛腸醫院綜合信息管理系統"
ClientHeight = 6810
ClientLeft = 45
ClientTop = 375
ClientWidth = 9735
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "yaopin.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6810
ScaleWidth = 9735
StartUpPosition = 2 '屏幕中心
Begin MSDataGridLib.DataGrid DataGrid1
Height = 5175
Left = 240
TabIndex = 5
Top = 960
Width = 9135
_ExtentX = 16113
_ExtentY = 9128
_Version = 393216
AllowUpdate = -1 'True
HeadLines = 1
RowHeight = 23
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
Begin VB.CommandButton Command1
Caption = "查 詢"
Height = 375
Left = 6480
TabIndex = 1
Top = 240
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "關 閉"
Height = 375
Left = 7920
TabIndex = 0
Top = 240
Width = 1215
End
Begin MSComCtl2.DTPicker v_sj1
Height = 375
Left = 1440
TabIndex = 2
Top = 240
Width = 2175
_ExtentX = 3836
_ExtentY = 661
_Version = 393216
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Format = 64487425
CurrentDate = 39632
End
Begin MSComCtl2.DTPicker v_sj2
Height = 375
Left = 3960
TabIndex = 3
Top = 240
Width = 2175
_ExtentX = 3836
_ExtentY = 661
_Version = 393216
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Format = 64487425
CurrentDate = 39632
End
Begin MSAdodcLib.Adodc Adodc1
Height = 615
Left = 3000
Top = 3720
Width = 1455
_ExtentX = 2566
_ExtentY = 1085
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 = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "總金額:"
Height = 210
Left = 7440
TabIndex = 7
Top = 6240
Width = 840
End
Begin VB.Label v_count
AutoSize = -1 'True
Caption = "0"
Height = 210
Left = 8280
TabIndex = 6
Top = 6240
Width = 105
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "時間"
Height = 210
Left = 480
TabIndex = 4
Top = 360
Width = 420
End
End
Attribute VB_Name = "yaopin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim sql As String
sql = "select 藥品名稱,sum(數量) as 數量,sum(金額) as 金額 from 藥品銷售表 where 日期 between '" & v_sj1.Value & "'and '" & v_sj2.Value & "' group by 藥品名稱"
Dim rs As New ADODB.Recordset
rs.Open sql, db
If Not rs.EOF Then
sql1 = "select sum(金額) as 金額 from 藥品銷售表 where 日期 between '" & v_sj1.Value & "'and '" & v_sj2.Value & "'"
Dim rs1 As New ADODB.Recordset
rs1.Open sql1, db
v_count.Caption = rs1("金額")
Adodc1.CommandType = adCmdText
Adodc1.ConnectionString = db
Adodc1.RecordSource = sql
Set DataGrid1.DataSource = Adodc1
Adodc1.Refresh
Command2.Enabled = True
Else
b1 = MsgBox("警告, 沒有選擇記錄!", vbQuestion, "系統提示!")
Adodc1.CommandType = adCmdText
Adodc1.ConnectionString = db
Adodc1.RecordSource = sql
Set DataGrid1.DataSource = Adodc1
Adodc1.Refresh
Command2.Enabled = False
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
v_sj1.Value = Date
v_sj2.Value = Date
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -