📄 frmxiugai.frm
字号:
VERSION 5.00
Begin VB.Form Frmxiugai
BackColor = &H0080FF80&
Caption = "Frmxiugai"
ClientHeight = 4350
ClientLeft = 60
ClientTop = 345
ClientWidth = 5355
LinkTopic = "Form2"
ScaleHeight = 4350
ScaleWidth = 5355
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 2880
TabIndex = 12
Top = 3720
Width = 975
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 1320
TabIndex = 11
Top = 3720
Width = 975
End
Begin VB.TextBox Text5
Height = 375
Left = 2520
TabIndex = 9
Top = 3000
Width = 2055
End
Begin VB.TextBox Text4
Height = 375
Left = 2520
TabIndex = 8
Top = 2520
Width = 2055
End
Begin VB.TextBox Text3
Height = 375
Left = 2520
TabIndex = 7
Top = 2040
Width = 2055
End
Begin VB.TextBox Text2
Height = 375
Left = 2520
TabIndex = 6
Top = 1560
Width = 2055
End
Begin VB.TextBox Text1
Height = 375
Left = 2520
TabIndex = 5
Top = 1080
Width = 2055
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "器材目录修改"
BeginProperty Font
Name = "华文新魏"
Size = 26.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 855
Left = 960
TabIndex = 10
Top = 240
Width = 3615
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "库存数量:"
BeginProperty Font
Name = "楷体_GB2312"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 495
Left = 600
TabIndex = 4
Top = 3000
Width = 1575
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "库存标准:"
BeginProperty Font
Name = "楷体_GB2312"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 495
Left = 600
TabIndex = 3
Top = 2520
Width = 1695
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "器材单位:"
BeginProperty Font
Name = "楷体_GB2312"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 495
Left = 600
TabIndex = 2
Top = 2040
Width = 1695
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "器材名称:"
BeginProperty Font
Name = "楷体_GB2312"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 495
Left = 600
TabIndex = 1
Top = 1560
Width = 1575
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "器材代码:"
BeginProperty Font
Name = "楷体_GB2312"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 495
Left = 600
TabIndex = 0
Top = 1080
Width = 1695
End
End
Attribute VB_Name = "Frmxiugai"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public flag As Integer
Private Sub Command1_Click()
'首先要判断录入数据的有效性
'器材代码不能为空值
If Trim(Text1.Text) = "" Then
MsgBox "器材代码不能为空,请重新设置!", vbInformation, "提示"
txtqcdm.SetFocus '焦点返回
Exit Sub '退出子程序
End If
If flag = 1 Then
With Frmshujuweihu.Adodc1.Recordset
.AddNew
.Fields!qcdm = Trim(Text1.Text)
.Fields!dw = Val(tText3.Text)
.Fields!mc = Trim(Text2.Text)
.Fields!kcbz = Val(Text4.Text)
.Fields!kcsl = Val(Text5.Text)
.Update
End With
End If
If flag = 2 Then
With Frmshujuweihu.Adodc1.Recordset
.Fields!qcdm = Trim(Text1.Text)
.Fields!dw = Trim(Text3.Text)
.Fields!mc = Trim(Text2.Text)
.Fields!kcbz = Val(Text4.Text)
.Fields!kcsl = Val(Text5.Text)
'.Update
End With
End If
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -