📄 f31.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form f31
BackColor = &H00FFC0C0&
Caption = "f31"
ClientHeight = 9075
ClientLeft = 60
ClientTop = 450
ClientWidth = 8310
LinkTopic = "Form1"
ScaleHeight = 9075
ScaleWidth = 8310
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox t8
BackColor = &H00E0E0E0&
Height = 375
Left = 3120
TabIndex = 18
Top = 7200
Width = 2655
End
Begin VB.TextBox t7
BackColor = &H00E0E0E0&
Height = 375
Left = 3120
TabIndex = 17
Top = 6600
Width = 2655
End
Begin VB.TextBox t6
BackColor = &H00E0E0E0&
Height = 375
Left = 3120
TabIndex = 16
Top = 5880
Width = 2655
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 6000
TabIndex = 15
Top = 7920
Width = 1695
End
Begin VB.TextBox t1
BackColor = &H00E0E0E0&
Height = 375
Left = 3120
TabIndex = 5
Top = 2400
Width = 4335
End
Begin VB.TextBox t2
BackColor = &H00E0E0E0&
Height = 375
Left = 3120
TabIndex = 4
Top = 3000
Width = 1695
End
Begin VB.TextBox t3
BackColor = &H00E0E0E0&
Height = 375
Left = 3120
TabIndex = 3
Top = 3720
Width = 1695
End
Begin VB.TextBox t4
BackColor = &H00E0E0E0&
Height = 375
Left = 3120
TabIndex = 2
Top = 4440
Width = 1695
End
Begin VB.TextBox t5
BackColor = &H00E0E0E0&
Height = 375
Left = 3120
TabIndex = 1
Top = 5160
Width = 2655
End
Begin VB.CommandButton Command1
Caption = "提交"
Height = 375
Left = 3120
TabIndex = 0
Top = 7920
Width = 1935
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 8640
Top = 2400
Width = 1695
_ExtentX = 2990
_ExtentY = 661
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 = "Provider=MSDASQL.1;Password=19871111;Persist Security Info=True;User ID=sa;Data Source=medicine"
OLEDBString = "Provider=MSDASQL.1;Password=19871111;Persist Security Info=True;User ID=sa;Data Source=medicine"
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 Label9
BackColor = &H00FFC0C0&
Caption = "买家联系方式"
BeginProperty Font
Name = "幼圆"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1080
TabIndex = 14
Top = 7200
Width = 1575
End
Begin VB.Label Label8
BackColor = &H00FFC0C0&
Caption = "买家"
BeginProperty Font
Name = "幼圆"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2160
TabIndex = 13
Top = 6600
Width = 735
End
Begin VB.Label Label1
BackColor = &H00FFC0C0&
Caption = "填写出库登记表"
BeginProperty Font
Name = "幼圆"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3120
TabIndex = 12
Top = 1440
Width = 2415
End
Begin VB.Label Label2
BackColor = &H00FFC0C0&
Caption = "药品名称"
BeginProperty Font
Name = "幼圆"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1680
TabIndex = 11
Top = 2400
Width = 1095
End
Begin VB.Label Label3
BackColor = &H00FFC0C0&
Caption = "数量"
BeginProperty Font
Name = "幼圆"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2160
TabIndex = 10
Top = 4440
Width = 615
End
Begin VB.Label Label5
BackColor = &H00FFC0C0&
Caption = "负责人"
BeginProperty Font
Name = "幼圆"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1920
TabIndex = 9
Top = 3720
Width = 855
End
Begin VB.Label Label6
BackColor = &H00FFC0C0&
Caption = "出库价格"
BeginProperty Font
Name = "幼圆"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1680
TabIndex = 8
Top = 5160
Width = 1095
End
Begin VB.Label Label7
BackColor = &H00FFC0C0&
Caption = "出库日期"
BeginProperty Font
Name = "幼圆"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1680
TabIndex = 7
Top = 3000
Width = 1095
End
Begin VB.Label Label4
BackColor = &H00FFC0C0&
Caption = "出库编号"
BeginProperty Font
Name = "幼圆"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1680
TabIndex = 6
Top = 5880
Width = 1095
End
End
Attribute VB_Name = "f31"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim sql As String
If Trim(t1.Text) = "" Then
MsgBox "药名不能为空!", vbOKOnly
Exit Sub
End If
sql = "select * from med where 药名='" & t1 & " '"
Adodc1.RecordSource = sql
Adodc1.Refresh
If Adodc1.Recordset.BOF Then
MsgBox "该药品不存在!", vbOKOnly
Exit Sub
End If
If Trim(t6.Text) = "" Then
MsgBox "出库编号不能为空!", vbOKOnly
Exit Sub
End If
sql = "select * from output where 出货号='" & t6 & " '"
Adodc1.RecordSource = sql
Adodc1.Refresh
If Adodc1.Recordset.BOF Then
Else
MsgBox "编号已存在!", vbOKOnly
Exit Sub
End If
If Trim(t2.Text) = "" Then
MsgBox "日期不能为空!", vbOKOnly
Exit Sub
End If
If Trim(t4.Text) = "" Then
MsgBox "数量不能为空!", vbOKOnly
Exit Sub
End If
If Trim(t3.Text) = "" Then
MsgBox "负责人不能为空!", vbOKOnly
Exit Sub
End If
If Trim(t5.Text) = "" Then
MsgBox "入库价格不能为空!", vbOKOnly
Exit Sub
End If
If Trim(t7.Text) = "" Then
MsgBox "买家不能为空!", vbOKOnly
Exit Sub
End If
Dim sqlstr As String
sqlstr = "select * from output"
Adodc1.RecordSource = sqlstr
Adodc1.Refresh
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields("药名") = Trim(t1)
Adodc1.Recordset.Fields("日期") = Trim(t2)
Adodc1.Recordset.Fields("数量") = Trim(t4)
Adodc1.Recordset.Fields("负责人") = Trim(t3)
Adodc1.Recordset.Fields("售出价") = Trim(t5)
Adodc1.Recordset.Fields("出货号") = Trim(t6)
Adodc1.Recordset.Fields("买家") = Trim(t7)
Adodc1.Recordset.Fields("买家联系方式") = Trim(t8)
Adodc1.Recordset.Update
Me.Hide
MsgBox "记录已添加!", vbOKOnly
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -