⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmadduser.frm

📁 短信群发标准版
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      TabIndex        =   23
      Top             =   135
      Width           =   855
   End
   Begin VB.Label Label2 
      Caption         =   "性别"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   2400
      TabIndex        =   22
      Top             =   135
      Width           =   495
   End
   Begin VB.Label Label1 
      Caption         =   "姓名"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   480
      TabIndex        =   21
      Top             =   135
      Width           =   495
   End
   Begin VB.Label Label12 
      Caption         =   "备注"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   480
      TabIndex        =   9
      Top             =   3000
      Width           =   495
   End
   Begin VB.Label Label11 
      Caption         =   "Email"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   3240
      TabIndex        =   8
      Top             =   2520
      Width           =   615
   End
   Begin VB.Label Label10 
      Caption         =   "邮政编码"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   120
      TabIndex        =   7
      Top             =   2520
      Width           =   855
   End
   Begin VB.Label Label9 
      Caption         =   "传真"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   4440
      TabIndex        =   6
      Top             =   2040
      Width           =   495
   End
   Begin VB.Label Label8 
      Caption         =   "家庭电话"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   120
      TabIndex        =   5
      Top             =   2040
      Width           =   855
   End
   Begin VB.Label Label7 
      Caption         =   "办公电话"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   4080
      TabIndex        =   4
      Top             =   1560
      Width           =   855
   End
   Begin VB.Label Label6 
      Caption         =   "手机号码"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   120
      TabIndex        =   3
      Top             =   1560
      Width           =   855
   End
   Begin VB.Label Label4 
      Caption         =   "公司名称"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   120
      TabIndex        =   2
      Top             =   1080
      Width           =   855
   End
   Begin VB.Label Label5 
      Caption         =   "住址"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   480
      TabIndex        =   1
      Top             =   600
      Width           =   495
   End
End
Attribute VB_Name = "frmUser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
    Dim rst As Recordset
    Dim strSQL As String
    Dim i As Integer
    
    If checkInput = False Then Exit Sub
    strSQL = "select * from customer where mobile='" & Trim(Text1(4).Text) & "'"
    Set rst = db.OpenRecordset(strSQL)
    If Not rst.EOF Then
        MsgBox "该手机号码已经存在,请重新输入", , "提示"
        Text1(4) = ""
        Text1(4).SetFocus
        rst.Close
        Set rst = Nothing
        Exit Sub
    End If
    rst.Close
    Set rst = Nothing
    strSQL = "select * from customer"
    Set rst = db.OpenRecordset(strSQL)
    With rst
        .AddNew
        .Fields("name") = Text1(0)
        .Fields("birth") = Text1(1)
        .Fields("address") = Text1(2)
        .Fields("company") = Text1(3)
        .Fields("mobile") = Text1(4)
        .Fields("phone1") = Text1(5)
        .Fields("phone2") = Text1(6)
        .Fields("fax") = Text1(7)
        .Fields("zipcode") = Text1(8)
        .Fields("email") = Text1(9)
        .Fields("comment") = Text1(10)
        .Update
    End With
    rst.Close
    Set rst = Nothing
    For i = 0 To 10
        Text1(i).Text = ""
    Next i
    frmCustom.RefreshData
    Unload Me
End Sub

Private Sub Command2_Click()
    Unload Me
End Sub

Private Sub Form_Load()
    cboSex.ListIndex = 0
End Sub
Function checkInput() As Boolean
    checkInput = False
    If Trim(Text1(4)) = "" Then
        MsgBox "手机号码不能为空,请输入", , "提示"
        Text1(4).SetFocus
        Exit Function
    End If
    checkInput = True
End Function

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -