📄 原料管理-订购单.frm
字号:
VERSION 5.00
Begin VB.Form Form15
Caption = "原料管理-订购单"
ClientHeight = 7500
ClientLeft = 60
ClientTop = 345
ClientWidth = 10875
LinkTopic = "Form15"
ScaleHeight = 7500
ScaleWidth = 10875
StartUpPosition = 3 '窗口缺省
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "系统数据库.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 345
Left = 5520
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "原料管理信息"
Top = 6360
Visible = 0 'False
Width = 1380
End
Begin VB.CommandButton Command1
Caption = "保存信息"
Height = 375
Left = 3120
TabIndex = 12
Top = 6360
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "退 出"
Height = 375
Left = 7920
TabIndex = 11
Top = 6360
Width = 1095
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 7320
TabIndex = 4
Top = 1920
Width = 2295
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 = 1575
Left = 2400
TabIndex = 3
Top = 4080
Width = 7335
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 = 495
Left = 7320
TabIndex = 2
Top = 3000
Width = 2295
End
Begin VB.TextBox Text3
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2400
TabIndex = 1
Top = 3000
Width = 2295
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 = 495
Left = 2400
TabIndex = 0
Top = 1920
Width = 2295
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "原 料 订 购 单"
BeginProperty Font
Name = "黑体"
Size = 24
Charset = 134
Weight = 400
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3600
TabIndex = 10
Top = 600
Width = 3360
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "备 注:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 720
TabIndex = 9
Top = 4320
Width = 1080
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "原料数量:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 5640
TabIndex = 8
Top = 3120
Width = 1080
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "原料价格:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 720
TabIndex = 7
Top = 3120
Width = 1200
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "原料名称:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 5640
TabIndex = 6
Top = 2040
Width = 1200
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "原料编号:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 720
TabIndex = 5
Top = 2040
Width = 1200
End
End
Attribute VB_Name = "Form15"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim db As Database, rs As Recordset
Set db = OpenDatabase(App.Path + "/系统数据库.mdb")
Set rs = db.OpenRecordset("原料管理信息", dbOpenTable)
If Text1.Text = "" And Text2.Text = "" And Text3.Text = "" And Text4.Text = "" And Text5.Text = "" Then
MsgBox "记录不能为空!", vbOKOnly + vbCritical, "提示"
Else
Text1.SetFocus
rs.AddNew
rs.Fields(0).Value = Text1.Text
rs.Fields(1).Value = Text2.Text
rs.Fields(2).Value = Text3.Text
rs.Fields(3).Value = Text4.Text
rs.Fields(4).Value = Text5.Text
rs.Update
rs.Fields.Refresh
MsgBox "信息输入成功!", vbOKOnly, "恭喜"
Form2.Show
End If
End Sub
Private Sub Command2_Click()
Unload Me
Form2.Show
End Sub
Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -