?? wh_jmadd.frm
字號:
VERSION 5.00
Begin VB.Form wh_jmadd
BorderStyle = 1 'Fixed Single
Caption = "齊英天肛腸醫(yī)院綜合信息管理系統(tǒng)"
ClientHeight = 3105
ClientLeft = 45
ClientTop = 330
ClientWidth = 7185
Icon = "wh_jmadd.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3105
ScaleWidth = 7185
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "放 棄"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3960
TabIndex = 12
Top = 2520
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "增 加"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2280
TabIndex = 11
Top = 2520
Width = 1095
End
Begin VB.Frame Frame1
Caption = "藥品編碼增加"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2295
Left = 120
TabIndex = 5
Top = 120
Width = 6855
Begin VB.ComboBox v_type
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
ItemData = "wh_jmadd.frx":0BC2
Left = 1200
List = "wh_jmadd.frx":0BCF
TabIndex = 14
Top = 1560
Width = 1455
End
Begin VB.TextBox v_danjia
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5880
TabIndex = 4
Text = "0"
Top = 960
Width = 615
End
Begin VB.TextBox v_danwei
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4200
TabIndex = 3
Top = 960
Width = 615
End
Begin VB.TextBox v_guige
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1200
TabIndex = 2
Top = 960
Width = 1455
End
Begin VB.TextBox v_name
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4200
TabIndex = 1
Top = 360
Width = 2295
End
Begin VB.TextBox v_bm
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1200
TabIndex = 0
Top = 360
Width = 1455
End
Begin VB.Label Label6
Caption = "藥品類別"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 240
TabIndex = 13
Top = 1680
Width = 855
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "單 價"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 5040
TabIndex = 10
Top = 1080
Width = 735
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "單 位"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 3120
TabIndex = 9
Top = 1080
Width = 840
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "規(guī) 格"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 240
TabIndex = 8
Top = 1080
Width = 735
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "藥品名稱"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 3120
TabIndex = 7
Top = 480
Width = 840
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "藥品編碼"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 240
TabIndex = 6
Top = 480
Width = 840
End
End
End
Attribute VB_Name = "wh_jmadd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
b1 = MsgBox("您確實繼續(xù)嗎?", vbOKCancel, "系統(tǒng)提示!")
If b1 = 1 Then
If v_bm.Text = "" Then
b1 = MsgBox("警告,編碼不能為空值!", vbQuestion, "系統(tǒng)提示!")
v_bm.SetFocus
Exit Sub
End If
If v_name.Text = "" Then
b1 = MsgBox("警告,藥品名稱不能為空值!", vbQuestion, "系統(tǒng)提示!")
v_name.SetFocus
Exit Sub
End If
If v_guige.Text = "" Then
b1 = MsgBox("警告,規(guī)格不能為空值!", vbQuestion, "系統(tǒng)提示!")
v_guige.SetFocus
Exit Sub
End If
If v_danwei.Text = "" Then
b1 = MsgBox("警告,單位不能為空值!", vbQuestion, "系統(tǒng)提示!")
v_danwei.SetFocus
Exit Sub
End If
If Not IsNumeric(v_danjia.Text) Then
b1 = MsgBox("警告,單價不能為空或非數(shù)字!", vbQuestion, "系統(tǒng)提示!")
v_danjia.SetFocus
Exit Sub
End If
If v_type.Text = "" Then
b1 = MsgBox("警告,類別不能為空值!", vbQuestion, "系統(tǒng)提示!")
v_type.SetFocus
Exit Sub
End If
Dim sql As String
sql = "insert into 藥品簡碼(編碼,藥品名稱,規(guī)格,單位,單價,類別) values ('" & Trim(v_bm.Text) & "','" + Trim(v_name.Text) + "','" + Trim(v_guige.Text) + "','" + Trim(v_danwei.Text) + "','" + Trim(v_danjia.Text) + "','" + Trim(v_type.Text) + "')"
Dim rs As New ADODB.Recordset
rs.Open sql, db
b1 = MsgBox("恭喜,數(shù)據(jù)輸入成功!", vbInformation, "系統(tǒng)提示!")
Exit Sub
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -