?? frmbusinessmanedit.frm
字號:
VERSION 5.00
Begin VB.Form FrmBusinessmanEdit
Caption = "供應商信息"
ClientHeight = 4995
ClientLeft = 60
ClientTop = 510
ClientWidth = 11880
Icon = "FrmBusinessmanEdit.frx":0000
LinkTopic = "Form1"
ScaleHeight = 4995
ScaleWidth = 11880
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Telephone
Caption = "供應商基本信息"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2775
Left = 480
TabIndex = 13
Top = 1200
Width = 10815
Begin VB.TextBox TxtFax
Height = 375
Left = 7080
TabIndex = 8
Top = 1560
Width = 3255
End
Begin VB.TextBox TxtTelephone
Height = 375
Left = 7080
TabIndex = 7
Top = 960
Width = 3255
End
Begin VB.TextBox TxtLinkman
Height = 375
Left = 7080
TabIndex = 6
Top = 360
Width = 3255
End
Begin VB.TextBox TxtAddress
Height = 375
Left = 1560
TabIndex = 5
Top = 2160
Width = 8775
End
Begin VB.TextBox TxtCity
Height = 375
Left = 1560
TabIndex = 4
Top = 1560
Width = 3255
End
Begin VB.TextBox TxtProvince
Height = 375
Left = 1560
TabIndex = 3
Top = 960
Width = 3255
End
Begin VB.TextBox TxtCountry
Height = 375
Left = 1560
TabIndex = 2
Top = 360
Width = 3255
End
Begin VB.Label Label9
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 = 5760
MouseIcon = "FrmBusinessmanEdit.frx":0CCA
TabIndex = 20
Top = 1560
Width = 1095
End
Begin VB.Label Label8
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 = 5760
MouseIcon = "FrmBusinessmanEdit.frx":0FD4
TabIndex = 19
Top = 960
Width = 1095
End
Begin VB.Label Label7
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 = 5640
MouseIcon = "FrmBusinessmanEdit.frx":12DE
TabIndex = 18
Top = 360
Width = 1095
End
Begin VB.Label Label6
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 = "FrmBusinessmanEdit.frx":15E8
TabIndex = 17
Top = 2160
Width = 1095
End
Begin VB.Label Label5
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 = "FrmBusinessmanEdit.frx":18F2
TabIndex = 16
Top = 1560
Width = 1095
End
Begin VB.Label Label4
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 = "FrmBusinessmanEdit.frx":1BFC
TabIndex = 15
Top = 960
Width = 1095
End
Begin VB.Label Label3
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 = "FrmBusinessmanEdit.frx":1F06
TabIndex = 14
Top = 360
Width = 1095
End
End
Begin VB.TextBox TxtBusinessmanName
Height = 375
Left = 7560
TabIndex = 1
Top = 480
Width = 3255
End
Begin VB.TextBox TxtBusinessmanID
Height = 375
Left = 2040
TabIndex = 0
Top = 480
Width = 3375
End
Begin VB.Label Label2
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 = 5760
MouseIcon = "FrmBusinessmanEdit.frx":2210
TabIndex = 12
Top = 480
Width = 1575
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 = 480
MouseIcon = "FrmBusinessmanEdit.frx":251A
TabIndex = 11
Top = 480
Width = 1335
End
Begin VB.Image Image4
Height = 300
Left = 6600
Picture = "FrmBusinessmanEdit.frx":2824
Top = 4320
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 = 7200
MouseIcon = "FrmBusinessmanEdit.frx":2C40
MousePointer = 99 'Custom
TabIndex = 10
Top = 4320
Width = 855
End
Begin VB.Image Image3
Height = 300
Left = 4200
Picture = "FrmBusinessmanEdit.frx":2F4A
Top = 4320
Width = 300
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 = 4800
MouseIcon = "FrmBusinessmanEdit.frx":3366
MousePointer = 99 'Custom
TabIndex = 9
Top = 4320
Width = 735
End
End
Attribute VB_Name = "FrmBusinessmanEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public OriBusinessmanID As String
Private Sub LblCancel_Click()
Unload Me
End Sub
Private Sub LblOK_Click()
'判斷要編輯信息是否完整
If Check = False Then
Exit Sub
End If
With MyBusinessman
.BusinessmanID = TxtBusinessmanID.Text
.BusinessmanName = TxtBusinessmanName.Text
.Country = TxtCountry.Text
.Province = TxtProvince.Text
.City = TxtCity.Text
.Address = TxtAddress.Text
.Linkman = TxtLinkman.Text
.Telephone = TxtTelephone.Text
.Fax = TxtFax.Text
'判斷操作是添加還是修改
If Modify = False Then '判斷為添加操作
'判斷銷售員ID是否已經存在
If .In_DB(TxtBusinessmanID.Text) = True Then
MsgBox "客戶代號重復,請重新設置"
TxtBusinessmanID.SetFocus
TxtBusinessmanID.SelStart = 0
TxtBusinessmanID.SelLength = Len(TxtBusinessmanID)
Exit Sub
Else
.Insert '添加
MsgBox "添加成功"
End If
Else '判斷為修改操作
.Update (OriBusinessmanID)
MsgBox "修改成功"
End If
End With
Unload Me
FrmBusinessman.Adodc1.Refresh
End Sub
Private Function Check() As Boolean
If Trim(TxtBusinessmanID) = "" Then
MsgBox "請輸入客戶代號"
TxtBusinessmanID.SetFocus
Check = False
Exit Function
End If
If Trim(TxtBusinessmanName) = "" Then
MsgBox "請輸入客戶名稱"
TxtBusinessmanName.SetFocus
Check = False
Exit Function
End If
Check = True
End Function
Private Sub TxtFax_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
If In_Single(KeyAscii) = False Then
KeyAscii = 0
End If
End Sub
Private Sub TxtTelephone_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
If In_Single(KeyAscii) = False Then
KeyAscii = 0
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -