📄 frmstoreedit.frm
字号:
VERSION 5.00
Begin VB.Form FrmStoreEdit
BorderStyle = 1 'Fixed Single
Caption = "编辑仓库信息"
ClientHeight = 2505
ClientLeft = 45
ClientTop = 330
ClientWidth = 5130
Icon = "FrmStoreEdit.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2505
ScaleWidth = 5130
StartUpPosition = 1 '所有者中心
Begin VB.CommandButton Cmd_Cancel
Cancel = -1 'True
Caption = "取 消"
Height = 400
Left = 2687
MouseIcon = "FrmStoreEdit.frx":0CCA
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 3
Top = 1920
Width = 1300
End
Begin VB.CommandButton Cmd_OK
Caption = "确 定"
Height = 400
Left = 1144
MouseIcon = "FrmStoreEdit.frx":0FD4
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 2
Top = 1920
Width = 1300
End
Begin VB.Frame Frame1
Height = 1575
Left = 218
TabIndex = 4
Top = 120
Width = 4695
Begin VB.TextBox txtStore
Height = 270
Left = 1320
MaxLength = 100
TabIndex = 0
Top = 210
Width = 3135
End
Begin VB.TextBox txtDescribe
Height = 735
Left = 1320
MaxLength = 100
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 1
Top = 600
Width = 3135
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "仓库名称"
Height = 180
Left = 240
TabIndex = 6
Top = 240
Width = 720
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "描述信息"
Height = 180
Left = 240
TabIndex = 5
Top = 630
Width = 720
End
End
End
Attribute VB_Name = "FrmStoreEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public OriName As String
Public OriId As Long
Private Function Check() As Boolean
If Trim(txtStore) = "" Then
MsgBox "请输入仓库名称"
txtStore.SetFocus
Check = False
Exit Function
End If
Check = True
End Function
Private Sub Cmd_OK_Click()
If Check = False Then
Exit Sub
End If
With MyStore
.StoreName = MakeStr(txtStore)
.Describe = MakeStr(txtDescribe)
'判断仓库名称是否存在
If Modify = False Or OriName <> Trim(txtStore) Then
If .In_DB(MakeStr(txtStore)) = True Then
MsgBox "仓库名称已经存在,请重新输入"
txtStore.SetFocus
txtStore.SelStart = 0
txtStore.SelLength = Len(txtStore)
Exit Sub
End If
End If
If Modify = False Then
.Insert
MsgBox "添加成功"
Else
.Update (OriId)
MsgBox "修改成功"
End If
End With
Unload Me
End Sub
Private Sub Cmd_Cancel_Click()
Unload Me
End Sub
Private Sub txtDescribe_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtStore_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -