?? form3.frm
字號(hào):
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form Form3
Caption = "藥品入庫(kù)"
ClientHeight = 5775
ClientLeft = 3945
ClientTop = 2205
ClientWidth = 7710
LinkTopic = "Form3"
Picture = "Form3.frx":0000
ScaleHeight = 5775
ScaleWidth = 7710
Begin MSComCtl2.DTPicker DTPicker2
Height = 375
Left = 5760
TabIndex = 18
Top = 3960
Width = 1695
_ExtentX = 2990
_ExtentY = 661
_Version = 393216
Format = 21168129
CurrentDate = 39259
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 375
Left = 1200
TabIndex = 17
Top = 3960
Width = 1575
_ExtentX = 2778
_ExtentY = 661
_Version = 393216
Format = 21168129
CurrentDate = 39259
End
Begin VB.CommandButton Command2
Caption = "退出"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 4560
TabIndex = 16
Top = 4920
Width = 1095
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 1200
TabIndex = 14
Top = 600
Width = 1575
End
Begin VB.CommandButton Command1
Caption = "確定"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1800
TabIndex = 12
Top = 4920
Width = 1215
End
Begin VB.ComboBox Combo1
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
ItemData = "Form3.frx":20FE
Left = 5760
List = "Form3.frx":2114
TabIndex = 9
Top = 600
Width = 1695
End
Begin VB.TextBox Text6
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 5760
TabIndex = 8
Top = 2880
Width = 1335
End
Begin VB.TextBox Text5
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 1200
TabIndex = 7
Top = 2880
Width = 1335
End
Begin VB.TextBox Text4
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 5760
TabIndex = 6
Top = 1680
Width = 1695
End
Begin VB.TextBox Text3
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 1200
TabIndex = 5
Top = 1680
Width = 1575
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "元"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 7200
TabIndex = 15
Top = 3000
Width = 495
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "入庫(kù)編號(hào):"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Index = 1
Left = 120
TabIndex = 13
Top = 720
Width = 1200
End
Begin VB.Label Label8
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "生產(chǎn)日期:"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 120
TabIndex = 11
Top = 4080
Width = 1185
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "過(guò)期日期:"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 4680
TabIndex = 10
Top = 4080
Width = 1200
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "入庫(kù)價(jià):"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 4920
TabIndex = 4
Top = 3000
Width = 960
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "藥品名稱:"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 120
TabIndex = 3
Top = 1800
Width = 1200
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "庫(kù)存單位:"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 4680
TabIndex = 2
Top = 1800
Width = 1200
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "入庫(kù)量:"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 360
TabIndex = 1
Top = 3000
Width = 960
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "藥品代碼:"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Index = 0
Left = 4680
TabIndex = 0
Top = 720
Width = 1200
End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_click()
Select Case Combo1.ListIndex
Case 0
Text3.Text = "板藍(lán)跟顆粒"
Text4.Text = "袋"
Case 1
Text3.Text = "諾氟沙星膠囊"
Text4.Text = "盒"
Case 2
Text3.Text = "阿莫西林膠囊"
Text4.Text = "盒"
Case 3
Text3.Text = "硫酸慶大霉素注射液"
Text4.Text = "盒"
Case 4
Text3.Text = "維C銀翹片"
Text4.Text = "袋"
Case 5
Text3.Text = "維生素B2片"
Text4.Text = "盒"
End Select
End Sub
Private Sub Command1_Click()
Dim rs As New ADODB.Recordset
Dim sql As String
If Text1.Text = "" Or (Not IsNumeric(Text1.Text)) Then
MsgBox "請(qǐng)輸入進(jìn)庫(kù)編號(hào)!", vbOKOnly + vbExclamation, "警告!"
Text1.SetFocus
Else
If Combo1.Text = "" Then
MsgBox "請(qǐng)輸入藥品代碼!", vbOKOnly + vbExclamation, "警告!"
Combo1.SetFocus
Else
If Text5.Text = "" Or (Not IsNumeric(Text5.Text)) Then
MsgBox "請(qǐng)輸入入庫(kù)數(shù)量!", vbOKOnly + vbExclamation, "警告!"
Text5.SetFocus
Else
If Text6.Text = "" Then
MsgBox "請(qǐng)輸入入庫(kù)價(jià)格!", vbOKOnly + vbExclamation, "警告!"
Text6.SetFocus
Else
sql = "select * from 藥品庫(kù)存表"
rs.Open sql, con, adOpenKeyset, adLockPessimistic
rs.AddNew
rs.Fields(0) = Text1.Text
rs.Fields(1) = Combo1.Text
rs.Fields(2) = Text3.Text
rs.Fields(3) = Text4.Text
rs.Fields(4) = Text5.Text
rs.Fields(5) = DTPicker1.Value
rs.Fields(6) = Text6.Text
rs.Fields(7) = DTPicker2.Value
rs.Update
MsgBox "藥品入庫(kù)操作完成,", vbOKOnly + vbExclamation, "恭喜!"
Text1.Text = ""
Combo1.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
End If
End If
End If
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Text1_LostFocus()
Dim rs As New ADODB.Recordset
Dim sql As String
If Text1.Text = "" Or (Not IsNumeric(Text1.Text)) Then
MsgBox "請(qǐng)輸入進(jìn)庫(kù)編號(hào)!", vbOKOnly + vbExclamation, "警告!"
Text1.SetFocus
Else
sql = "select * from 藥品庫(kù)存表"
rs.Open sql, con, adOpenKeyset, adLockPessimistic
rs.MoveFirst
Do While Not rs.EOF
If Text1.Text = rs.Fields(0) Then
MsgBox "請(qǐng)重新選擇一個(gè)進(jìn)庫(kù)編號(hào),", vbOKOnly + vbExclamation, "警告!"
Text1.SetFocus
End If
rs.MoveNext
Loop
rs.Close
End If
End Sub
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -