Private Sub Command2_Click()
Dim strWhere As String, strSQL As String
Dim strArray() As String
Dim i As Integer
If IsNull(Me.输入手机号码) Then Exit Sub
strArray = Split(Me.输入手机号码, "、")
For i = 0 To UBound(strArray)
strWhere = strWhere & "'" & strArray(i) & "',"
Next
strSQL = "delete from 表1 where 手机 in (" & strWhere & ")"
CurrentDb.Execute strSQL
End Sub
Private Sub 输入手机号码_KeyDown(KeyCode As Integer, Shift As Integer)
Dim strWhere As String
Dim strTemp As String
Dim intCount As Integer
If KeyCode = 229 Then
If Len(Me.输入手机号码.Text) >= 11 Then
strTemp = Mid(Me.输入手机号码.Text, Len(Me.输入手机号码.Text) - 10, 11)
strWhere = "手机='" & strTemp & "'"
intCount = DCount("*", "表1", strWhere)
If intCount = 0 Then
MsgBox "您刚输入的手机号码不存在"
End If
End If
End If
End Sub