📄 添加出仓表.frm
字号:
VERSION 5.00
Begin VB.Form Form10
Caption = "Form10"
ClientHeight = 3420
ClientLeft = 60
ClientTop = 405
ClientWidth = 4905
LinkTopic = "Form10"
ScaleHeight = 3420
ScaleWidth = 4905
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "返 回"
Height = 495
Left = 3120
TabIndex = 10
Top = 2520
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "添 加"
Height = 495
Left = 720
TabIndex = 9
Top = 2520
Width = 1215
End
Begin VB.Frame Frame1
Caption = "Frame1"
Height = 2055
Left = 0
TabIndex = 0
Top = 120
Width = 4815
Begin VB.TextBox Text4
Height = 495
Left = 3480
TabIndex = 8
Top = 1200
Width = 1095
End
Begin VB.TextBox Text3
Height = 495
Left = 1320
TabIndex = 7
Top = 1200
Width = 1095
End
Begin VB.TextBox Text2
Height = 495
Left = 3480
TabIndex = 6
Top = 360
Width = 1095
End
Begin VB.TextBox Text1
Height = 495
Left = 1320
TabIndex = 5
Top = 360
Width = 1095
End
Begin VB.Label Label4
Caption = "管 理 员 号:"
Height = 495
Left = 120
TabIndex = 4
Top = 1320
Width = 1215
End
Begin VB.Label Label3
Caption = "数 量:"
Height = 615
Left = 2520
TabIndex = 3
Top = 480
Width = 855
End
Begin VB.Label Label2
Caption = "出仓时间:"
Height = 495
Left = 2520
TabIndex = 2
Top = 1200
Width = 1095
End
Begin VB.Label Label1
Caption = "出仓物资号:"
Height = 495
Left = 120
TabIndex = 1
Top = 480
Width = 1095
End
End
End
Attribute VB_Name = "Form10"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim strInsert As String
strInsert = "insert into 出仓表 values('" & Text1.Text & "','" & Text2.Text & "','" & Text3.Text & "','" & Text4.Text & "')"
mycon.BeginTrans
mycon.Execute (strInsert)
mycon.CommitTrans
MsgBox "添加成功", vbInformation, "提示"
Text1.Text = "": Text2.Text = "": Text3.Text = "": Text4.Text = ""
Text1.SetFocus
Exit Sub
errhandle:
MsgBox "添加失败", vbInformation, "提示"
mycon.RollbackTrans
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -