?? frm_ex_add.frm
字號(hào):
VERSION 5.00
Begin VB.Form frm_ex_add
Caption = "添加出庫(kù)信息"
ClientHeight = 2700
ClientLeft = 60
ClientTop = 450
ClientWidth = 5250
LinkTopic = "Form1"
ScaleHeight = 2700
ScaleWidth = 5250
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Fault
Caption = "取消"
Height = 375
Left = 2880
TabIndex = 16
Top = 2160
Width = 1215
End
Begin VB.CommandButton Cmd_ex_OK
Caption = "添加"
Height = 375
Left = 960
TabIndex = 15
Top = 2160
Width = 1095
End
Begin VB.Frame Frame1
Height = 1815
Left = 360
TabIndex = 0
Top = 240
Width = 4575
Begin VB.TextBox Export_time
Height = 285
Left = 3600
TabIndex = 14
Top = 960
Width = 855
End
Begin VB.TextBox Patient_num
Height = 285
Left = 3600
TabIndex = 12
Top = 600
Width = 855
End
Begin VB.TextBox Patient_name
Height = 285
Left = 3600
TabIndex = 10
Top = 240
Width = 855
End
Begin VB.TextBox Export_price
Height = 285
Left = 1320
TabIndex = 8
Top = 1320
Width = 855
End
Begin VB.TextBox Export_type
Height = 285
Left = 1320
TabIndex = 6
Top = 600
Width = 855
End
Begin VB.TextBox Export_num
Height = 285
Left = 1320
TabIndex = 4
Top = 960
Width = 855
End
Begin VB.TextBox Export_name
Height = 285
Left = 1320
TabIndex = 2
Top = 240
Width = 855
End
Begin VB.Label Label7
Caption = "出庫(kù)時(shí)間"
Height = 255
Left = 2400
TabIndex = 13
Top = 960
Width = 1095
End
Begin VB.Label Label6
Caption = "購(gòu)藥病人編號(hào)"
Height = 255
Left = 2400
TabIndex = 11
Top = 600
Width = 1095
End
Begin VB.Label Label5
Caption = "購(gòu)藥病人姓名"
Height = 255
Left = 2400
TabIndex = 9
Top = 240
Width = 1095
End
Begin VB.Label Label4
Caption = "藥品出庫(kù)價(jià)格"
Height = 255
Left = 120
TabIndex = 7
Top = 1320
Width = 1095
End
Begin VB.Label Label3
Caption = "出庫(kù)藥品類型"
Height = 255
Left = 120
TabIndex = 5
Top = 600
Width = 1095
End
Begin VB.Label Label2
Caption = "藥品出庫(kù)數(shù)量"
Height = 255
Left = 120
TabIndex = 3
Top = 960
Width = 1095
End
Begin VB.Label Label1
Caption = "出庫(kù)藥品名稱"
Height = 255
Left = 120
TabIndex = 1
Top = 240
Width = 1095
End
End
End
Attribute VB_Name = "frm_ex_add"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Cmd_ex_OK_Click()
Dim strSQL
If Trim(Export_name) = "" Then
MsgBox "藥品名稱不能為空", vbOKOnly
Exit Sub
End If
If Trim(Export_type) = "" Then
MsgBox "出庫(kù)類型不能為空", vbOKOnly
Exit Sub
End If
If Trim(Export_price) = "" Then
MsgBox "出庫(kù)價(jià)格不能為空", vbOKOnly
Exit Sub
End If
If Trim(Export_num) = "" Then
MsgBox "出庫(kù)數(shù)量不能為空", vbOKOnly
Exit Sub
End If
If Trim(Patient_name) = "" Then
MsgBox "病人姓名不能為空", vbOKOnly
Exit Sub
End If
If Trim(Patient_num) = "" Then
MsgBox "病人編號(hào)不能為空", vbOKOnly
Exit Sub
End If
If Trim(Export_time) = "" Then
MsgBox "出庫(kù)時(shí)間不能為空", vbOKOnly
Exit Sub
End If
OpenDB
strSQL = "Select * from Drug_export"
objRS.Open strSQL, objConn, adOpenDynamic, adLockPessimistic
objRS.AddNew
objRS.Fields(1).Value = Export_name.Text
objRS.Fields(2).Value = Export_type.Text
objRS.Fields(4).Value = CDbl(Export_price.Text)
objRS.Fields(3).Value = CDbl(Export_num.Text)
objRS.Fields(5).Value = Patient_name.Text
objRS.Fields(6).Value = Patient_num.Text
objRS.Update
objRS.Close
CloseDB
MsgBox "記錄已添加", vbOKOnly
Unload Me
End Sub
Private Sub Fault_Click()
Unload Me
End Sub
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -