📄 frmbuildingedit.frm
字号:
VERSION 5.00
Begin VB.Form FrmBuildingEdit
BorderStyle = 1 'Fixed Single
Caption = "编辑楼房信息"
ClientHeight = 2535
ClientLeft = 45
ClientTop = 330
ClientWidth = 5760
Icon = "FrmBuildingEdit.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2535
ScaleWidth = 5760
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Cmd_Cancel
Cancel = -1 'True
Caption = "取 消"
Height = 400
Left = 3310
MouseIcon = "FrmBuildingEdit.frx":0CCA
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 4
Top = 1920
Width = 1300
End
Begin VB.CommandButton Cmd_OK
Caption = "确 定"
Height = 400
Left = 1150
MouseIcon = "FrmBuildingEdit.frx":0FD4
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 3
Top = 1920
Width = 1300
End
Begin VB.Frame Frame1
Height = 1575
Left = 240
TabIndex = 5
Top = 120
Width = 5295
Begin VB.TextBox txtFloor
Height = 270
Left = 4080
MaxLength = 20
TabIndex = 1
Top = 195
Width = 975
End
Begin VB.TextBox txtBuildingNo
Height = 270
Left = 1200
MaxLength = 100
TabIndex = 0
Top = 195
Width = 1575
End
Begin VB.TextBox txtDescribe
Height = 735
Left = 1200
MaxLength = 100
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 2
Top = 600
Width = 3855
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "楼房层数"
Height = 180
Left = 3120
TabIndex = 8
Top = 240
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "楼房编号"
Height = 180
Left = 240
TabIndex = 7
Top = 240
Width = 720
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "备注信息"
Height = 180
Left = 240
TabIndex = 6
Top = 630
Width = 720
End
End
End
Attribute VB_Name = "FrmBuildingEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public OriId As Long
Public OriBuildingNo As String
Private Function Check() As Boolean
If Trim(txtBuildingNo) = "" Then
MsgBox "请输入楼房编号"
txtBuildingNo.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 MyBuilding
.BuildingNo = MakeStr(txtBuildingNo)
.FloorNum = Val(txtFloor)
.Memo = MakeStr(txtDescribe)
'判断仓库名称是否存在
If Modify = False Or OriBuildingNo <> Trim(txtBuildingNo) Then
If .In_DB(MakeStr(txtBuildingNo)) = True Then
MsgBox "楼房编号已经存在,请重新输入"
txtBuildingNo.SetFocus
txtBuildingNo.SelStart = 0
txtBuildingNo.SelLength = Len(txtBuildingNo)
Exit Sub
End If
End If
If Modify = False Then
.Insert
Else
.Update (OriId)
End If
End With
Unload Me
End Sub
Private Sub Cmd_Cancel_Click()
Unload Me
End Sub
Private Sub txtFloor_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
If In_Single(KeyAscii) = False Then
KeyAscii = 0
End If
End Sub
Private Sub txtDescribe_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtBuildingNo_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -