📄 frmsalemanlogin.frm
字号:
VERSION 5.00
Begin VB.Form frmsalemanlogin
BackColor = &H00C0FFFF&
Caption = "销售人员登记"
ClientHeight = 7335
ClientLeft = 60
ClientTop = 450
ClientWidth = 8550
LinkTopic = "Form10"
MaxButton = 0 'False
ScaleHeight = 7335
ScaleWidth = 8550
StartUpPosition = 2 '屏幕中心
Begin VB.PictureBox MSHFlexGrid1
Height = 3135
Left = 120
ScaleHeight = 3075
ScaleWidth = 8235
TabIndex = 1
Top = 240
Width = 8295
End
Begin VB.Frame Frame1
BackColor = &H00C0FFFF&
Caption = "销售人员登记"
Height = 3615
Left = 120
TabIndex = 0
Top = 3480
Width = 8295
Begin VB.CommandButton cmdexit
Caption = "退出"
Height = 375
Left = 5520
TabIndex = 25
Top = 2640
Width = 975
End
Begin VB.CommandButton cmddel
Caption = "删除"
Height = 375
Left = 3840
TabIndex = 24
Top = 2640
Width = 975
End
Begin VB.CommandButton cmdmodify
Caption = "修改"
Height = 375
Left = 2280
TabIndex = 23
Top = 2640
Width = 975
End
Begin VB.CommandButton cmdadd
Caption = "增加"
Height = 375
Left = 720
TabIndex = 22
Top = 2640
Width = 975
End
Begin VB.TextBox txtzone
Height = 270
Left = 6240
TabIndex = 21
Top = 1920
Width = 1815
End
Begin VB.TextBox txtaddr
Height = 1095
Left = 5640
TabIndex = 20
Top = 600
Width = 2415
End
Begin VB.TextBox txtemail
Height = 270
Left = 3720
TabIndex = 19
Top = 1920
Width = 1455
End
Begin VB.TextBox txtcell
Height = 270
Left = 3720
TabIndex = 18
Top = 1320
Width = 1455
End
Begin VB.TextBox txttelnum
Height = 270
Left = 3720
TabIndex = 17
Top = 840
Width = 1455
End
Begin VB.PictureBox DTPicker1
Height = 255
Left = 3720
ScaleHeight = 195
ScaleWidth = 1395
TabIndex = 16
Top = 360
Width = 1455
End
Begin VB.ComboBox Combo1
Height = 300
Left = 1200
Style = 2 'Dropdown List
TabIndex = 15
Top = 1920
Width = 1455
End
Begin VB.TextBox txtname
Height = 270
Left = 1200
TabIndex = 14
Top = 1320
Width = 1455
End
Begin VB.TextBox txtID
Height = 270
Left = 1200
TabIndex = 13
Top = 840
Width = 1455
End
Begin VB.TextBox txtnum
Height = 270
Left = 1200
TabIndex = 12
Top = 360
Width = 1455
End
Begin VB.Label Label10
AutoSize = -1 'True
BackColor = &H00C0FFFF&
Caption = "邮编:"
Height = 180
Left = 5640
TabIndex = 11
Top = 1920
Width = 540
End
Begin VB.Label Label9
AutoSize = -1 'True
BackColor = &H00C0FFFF&
Caption = "通信地址:"
Height = 180
Left = 5640
TabIndex = 10
Top = 360
Width = 900
End
Begin VB.Label Label8
AutoSize = -1 'True
BackColor = &H00C0FFFF&
Caption = "电子邮件:"
Height = 180
Left = 2760
TabIndex = 9
Top = 1920
Width = 900
End
Begin VB.Label Label7
AutoSize = -1 'True
BackColor = &H00C0FFFF&
Caption = "手机:"
Height = 180
Left = 3120
TabIndex = 8
Top = 1320
Width = 540
End
Begin VB.Label Label6
AutoSize = -1 'True
BackColor = &H00C0FFFF&
Caption = "电话:"
Height = 180
Left = 3120
TabIndex = 7
Top = 840
Width = 540
End
Begin VB.Label Label5
AutoSize = -1 'True
BackColor = &H00C0FFFF&
Caption = "出生日期:"
Height = 180
Left = 2760
TabIndex = 6
Top = 360
Width = 900
End
Begin VB.Label Label4
AutoSize = -1 'True
BackColor = &H00C0FFFF&
Caption = "性别:"
Height = 180
Left = 600
TabIndex = 5
Top = 1920
Width = 540
End
Begin VB.Label Label3
AutoSize = -1 'True
BackColor = &H00C0FFFF&
Caption = "姓名:"
Height = 180
Left = 600
TabIndex = 4
Top = 1320
Width = 540
End
Begin VB.Label Label2
AutoSize = -1 'True
BackColor = &H00C0FFFF&
Caption = "身份证号:"
Height = 180
Left = 240
TabIndex = 3
Top = 840
Width = 900
End
Begin VB.Label Label1
AutoSize = -1 'True
BackColor = &H00C0FFFF&
Caption = "编号:"
Height = 180
Left = 600
TabIndex = 2
Top = 360
Width = 540
End
End
End
Attribute VB_Name = "frmsalemanlogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim rs_xiaoshou As New ADODB.Recordset
Dim gridclick As Boolean
Dim select_row As String '记录选择的楼盘
Dim getrow As Long
Private Sub cmdadd_Click()
On Error GoTo adderror
If cmdadd.Caption = "保存" Then
cmdadd.Caption = "增加"
If Trim(txtnum.Text) = "" Then
MsgBox "编号不能为空!", vbOKOnly + vbExclamation, "出错啦!"
txtnum.SetFocus
Exit Sub
End If
If Trim(txtID.Text) = "" Then
MsgBox "身份证号不能为空!", vbOKOnly + vbExclamation, "出错啦!"
txtID.SetFocus
Exit Sub
End If
If Trim(txtname.Text) = "" Then
MsgBox "姓名不能为空!", vbOKOnly + vbExclamation, "出错啦!"
txtname.SetFocus
Exit Sub
End If
If Trim(Combo1.Text) = "" Then
MsgBox "请选择性别!", vbOKOnly + vbExclamation, "出错啦!"
Combo1.SetFocus
Exit Sub
End If
rs_xiaoshou.MoveFirst
Dim i As Integer
For i = 0 To rs_xiaoshou.RecordCount - 1
If rs_xiaoshou.Fields(0) = txtnum.Text Then
MsgBox "编号重复!", vbOKOnly + vbExclamation, "出错啦!"
txtnum.SetFocus
Exit Sub
End If
If rs_xiaoshou.Fields(1) = txtID.Text Then
MsgBox "身份证号重复!", vbOKOnly + vbExclamation, "出错啦!"
txtID.SetFocus
Exit Sub
End If
rs_xiaoshou.MoveNext
Next i
rs_xiaoshou.MoveLast
rs_xiaoshou.AddNew
rs_xiaoshou.Fields(0) = txtnum.Text
rs_xiaoshou.Fields(1) = txtID.Text
rs_xiaoshou.Fields(2) = txtname.Text
rs_xiaoshou.Fields(3) = Combo1.Text
If Trim(txttelnum.Text) = "" Then
rs_xiaoshou.Fields(5) = Null
Else
rs_xiaoshou.Fields(5) = txttelnum.Text
End If
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -