📄 frmstoreinedit.frm
字号:
VERSION 5.00
Begin VB.Form FrmStoreInEdit
BorderStyle = 1 'Fixed Single
Caption = "编辑图书入库信息"
ClientHeight = 4785
ClientLeft = 45
ClientTop = 330
ClientWidth = 7230
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4785
ScaleWidth = 7230
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Cmd_OK
Caption = "确 定"
Default = -1 'True
Height = 400
Left = 1680
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 4
Top = 4200
Width = 1300
End
Begin VB.CommandButton Cmd_Cancel
Cancel = -1 'True
Caption = "取 消"
Height = 400
Left = 4200
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 5
Top = 4200
Width = 1300
End
Begin VB.Frame Frame1
Height = 3855
Left = 240
TabIndex = 6
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 = 14
Top = 840
Width = 4575
End
Begin VB.TextBox txtOptDate
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 = 11
Top = 3240
Width = 4575
End
Begin VB.TextBox txtStorePos
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 = 50
TabIndex = 2
Top = 2040
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 = 3
Top = 2640
Width = 4575
End
Begin VB.TextBox txtStoreId
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
Top = 285
Width = 4575
End
Begin VB.TextBox txtBookNum
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 = 1
Text = "0"
Top = 1440
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 = 13
Top = 1560
Width = 720
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 = 12
Top = 3360
Width = 720
End
Begin VB.Label Label8
AutoSize = -1 'True
BackColor = &H00FFC0C0&
BackStyle = 0 'Transparent
Caption = "书 号"
Height = 180
Left = 360
TabIndex = 10
Top = 960
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 = 9
Top = 2160
Width = 1080
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 = 8
Top = 2760
Width = 720
End
Begin VB.Label Label1
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 = 7
Top = 360
Width = 720
End
End
End
Attribute VB_Name = "FrmStoreInEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean '插入=false,修改=true
Private Sub Cmd_Cancel_Click()
Unload Me
End Sub
Private Sub Cmd_OK_Click()
'检查用户录入数据的有效性
If Len(Trim(txtStoreId)) = 0 Then
MsgBox "请输入入库编号!"
txtStoreId.SetFocus
txtStoreId.SelStart = 0
txtStoreId.SelLength = Len(txtStoreId)
Exit Sub
End If
If Len(Trim(txtBookNum)) = 0 Then
MsgBox "请输入入库数量"
txtBookNum.SetFocus
txtBookNum.SelStart = 0
txtBookNum.SelLength = Len(txtBookNum)
Exit Sub
End If
If Len(Trim(ComboBookNo)) = 0 Then
MsgBox "请输入图书编号"
ComboBookNo.SetFocus
ComboBookNo.SelStart = 0
ComboBookNo.SelLength = Len(ComboBookNo)
Exit Sub
End If
'把用户录入的数据赋值到数据库对象变量中
With MyStoreIn
.StoreId = MakeStr(txtStoreId)
.BookNo = MakeStr(ComboBookNo.Text)
.BookNum = Val(txtBookNum)
.StorePos = MakeStr(txtStorePos)
.EmpName = MakeStr(txtEmpName)
.OptDate = MakeStr(txtOptDate)
.Insert
Call MyBookInfo.UpdateStoreNum(.BookNo, .BookNum)
End With
'关闭窗口
Unload Me
End Sub
Private Sub ComboBookNo_GotFocus()
txtBookNum.SetFocus
'设置FrmBookTypeSel窗体的位置
FrmBookSel.Left = Me.Left + ComboBookNo.Left + 550
FrmBookSel.Top = Me.Top - 600
FrmBookSel.Show 1
'将选择的图书分类显示到ComboUpper控件中
ComboBookNo.Text = SelBookInfo.BookNo
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -