?? frmstoreroomedit.frm
字號:
VERSION 5.00
Begin VB.Form FrmStoreRoomEdit
Caption = "庫位信息"
ClientHeight = 5505
ClientLeft = 60
ClientTop = 510
ClientWidth = 5520
Icon = "FrmStoreRoomEdit.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5505
ScaleWidth = 5520
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox TxtStoreID
Height = 375
Left = 2160
TabIndex = 1
Top = 360
Width = 2775
End
Begin VB.TextBox TxtDescription
Height = 1815
Left = 2160
MultiLine = -1 'True
TabIndex = 4
Top = 2520
Width = 2775
End
Begin VB.TextBox TxtLocation
Height = 375
Left = 2160
TabIndex = 3
Top = 1800
Width = 2775
End
Begin VB.TextBox TxtStoreRoom
Height = 375
Left = 2160
TabIndex = 2
Top = 1080
Width = 2775
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "庫位ID"
BeginProperty Font
Name = "宋體"
Size = 15
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 720
MouseIcon = "FrmStoreRoomEdit.frx":0CCA
TabIndex = 9
Top = 360
Width = 1335
End
Begin VB.Label LblOK
BackStyle = 0 'Transparent
Caption = "確 定"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1440
MouseIcon = "FrmStoreRoomEdit.frx":0FD4
MousePointer = 99 'Custom
TabIndex = 5
Top = 4680
Width = 735
End
Begin VB.Image Image3
Height = 300
Left = 840
Picture = "FrmStoreRoomEdit.frx":12DE
Top = 4680
Width = 300
End
Begin VB.Label LblCancel
BackStyle = 0 'Transparent
Caption = "取 消"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3840
MouseIcon = "FrmStoreRoomEdit.frx":16FA
MousePointer = 99 'Custom
TabIndex = 6
Top = 4680
Width = 855
End
Begin VB.Image Image4
Height = 300
Left = 3240
Picture = "FrmStoreRoomEdit.frx":1A04
Top = 4680
Width = 300
End
Begin VB.Label LblDepartment
BackStyle = 0 'Transparent
Caption = "庫位描述"
BeginProperty Font
Name = "宋體"
Size = 15
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 480
MouseIcon = "FrmStoreRoomEdit.frx":1E20
TabIndex = 8
Top = 2520
Width = 1335
End
Begin VB.Label LblSalesmanName
BackStyle = 0 'Transparent
Caption = "位號"
BeginProperty Font
Name = "宋體"
Size = 15
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 720
MouseIcon = "FrmStoreRoomEdit.frx":212A
TabIndex = 7
Top = 1800
Width = 1575
End
Begin VB.Label LblBuyerID
BackStyle = 0 'Transparent
Caption = "庫號"
BeginProperty Font
Name = "宋體"
Size = 15
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 720
MouseIcon = "FrmStoreRoomEdit.frx":2434
TabIndex = 0
Top = 1080
Width = 1335
End
End
Attribute VB_Name = "FrmStoreRoomEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public OriStoreID As String
Private Sub LblCancel_Click()
Unload Me
End Sub
Private Function Check() As Boolean
If Trim(TxtStoreID) = "" Then
MsgBox "請輸入庫位ID"
TxtStoreID.SetFocus
Check = False
Exit Function
End If
If Trim(TxtStoreRoom) = "" Then
MsgBox "請輸入庫號"
TxtStoreRoom.SetFocus
Check = False
Exit Function
End If
If Trim(TxtLocation) = "" Then
MsgBox "請輸入位號"
TxtLocation.SetFocus
Check = False
Exit Function
End If
Check = True
End Function
Private Sub LblOK_Click()
'判斷要編輯信息是否完整
If Check = False Then
Exit Sub
End If
With MyStoreRoom
.StoreID = TxtStoreID.Text
.StoreRoom = TxtStoreRoom.Text
.Location = TxtLocation.Text
.Description = TxtDescription.Text
'判斷操作是添加還是修改
If Modify = False Then '判斷為添加操作
'判斷采購員ID是否已經存在
If .In_DB(TxtStoreID.Text) = True Then
MsgBox "庫位ID重復,請重新設置"
TxtStoreID.SetFocus
TxtStoreID.SelStart = 0
TxtStoreID.SelLength = Len(TxtBuyerID)
Exit Sub
Else
.Insert '添加
MsgBox "添加成功"
End If
Else '判斷為修改操作
.Update (OriStoreID)
MsgBox "修改成功"
End If
End With
Unload Me
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -