frmstorecountedit.frm
来自「VB和Oracle结合的程序」· FRM 代码 · 共 264 行
FRM
264 行
VERSION 5.00
Begin VB.Form FrmStoreCountEdit
BorderStyle = 1 'Fixed Single
Caption = "编辑图书盘点信息"
ClientHeight = 4185
ClientLeft = 45
ClientTop = 330
ClientWidth = 7230
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4185
ScaleWidth = 7230
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Cmd_OK
Caption = "确 定"
Default = -1 'True
Height = 400
Left = 1680
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 2
Top = 3600
Width = 1300
End
Begin VB.CommandButton Cmd_Cancel
Cancel = -1 'True
Caption = "取 消"
Height = 400
Left = 4200
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 3
Top = 3600
Width = 1300
End
Begin VB.Frame Frame1
Height = 3255
Left = 240
TabIndex = 4
Top = 120
Width = 6855
Begin VB.ComboBox ComboBookNo
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 1800
TabIndex = 11
Top = 240
Width = 4575
End
Begin VB.TextBox txtCountDate
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 1800
MaxLength = 20
TabIndex = 8
Top = 2640
Width = 4575
End
Begin VB.TextBox txtEmpName
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 1800
MaxLength = 20
TabIndex = 1
Top = 2040
Width = 4575
End
Begin VB.TextBox txtCountNum
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 1800
MaxLength = 100
TabIndex = 0
Text = "0"
Top = 1440
Width = 4575
End
Begin VB.Label lbl_BookName
Height = 375
Left = 1800
TabIndex = 12
Top = 840
Width = 4575
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "库存盘点数量"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 360
TabIndex = 10
Top = 1560
Width = 1080
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "盘点日期"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 360
TabIndex = 9
Top = 2760
Width = 720
End
Begin VB.Label Label8
AutoSize = -1 'True
BackColor = &H00FFC0C0&
BackStyle = 0 'Transparent
Caption = "书 号"
Height = 180
Left = 360
TabIndex = 7
Top = 360
Width = 720
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "图书名称"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 360
TabIndex = 6
Top = 960
Width = 720
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "盘 点 人"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 360
TabIndex = 5
Top = 2160
Width = 720
End
End
End
Attribute VB_Name = "FrmStoreCountEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean '插入=false,修改=true
Public OriTotalNum As Integer '库存原始数量
Private Sub Cmd_Cancel_Click()
Unload Me
End Sub
Private Sub Cmd_OK_Click()
'检查用户录入数据的有效性
If Len(Trim(ComboBookNo)) = 0 Then
MsgBox "请输入图书编号"
ComboBookNo.SetFocus
ComboBookNo.SelStart = 0
ComboBookNo.SelLength = Len(ComboBookNo)
Exit Sub
End If
If Len(Trim(txtCountNum)) = 0 Then
MsgBox "请输入库存盘点数量"
txtCountNum.SetFocus
txtCountNum.SelStart = 0
txtBooktxtCountNumNum.SelLength = Len(txtCountNum)
Exit Sub
End If
'把用户录入的数据赋值到MyBook对象变量中
With MyBook
.BookNo = MakeStr(ComboBookNo.Text)
.BookNum = Val(MyBookInfo.GetTotalNum(MakeStr(ComboBookNo.Text)))
.CountNum = MakeStr(txtCountNum)
.EmpName = MakeStr(txtEmpName)
.CountDate = MakeStr(txtCountDate)
'插入数据库
.Insert
'更新图书库存数量
Call MyBookInfo.UpdateTotalNum(.BookNo, .CountNum)
End With
'关闭窗口
Unload Me
End Sub
Private Sub ComboBookNo_GotFocus()
txtCountNum.SetFocus
'设置FrmBookTypeSel窗体的位置
FrmBookSel.Left = Me.Left + ComboBookNo.Left + 550
FrmBookSel.Top = Me.Top - 600
FrmBookSel.Show 1
'将选择的图书分类显示到ComboUpper控件中
ComboBookNo.Text = SelBookInfo.BookNo
lbl_BookName = SelBookInfo.BookName
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?