Private Sub Phone_AfterUpdate()
Dim strSQL As String
Dim rsPhone As DAO.Recordset
Dim varInDNC As Integer
strSQL = "SELECT * From tblDNCList " & _
"WHERE PhoneNum = '" & Me.Phone & "'"
Set rsPhone = CurrentDb.OpenRecordset(strSQL, dbOpenDynaset)
varInDNC = Me.InDNC
'<---- This line ^ gets a R-T 438 error------>
If Not rsPhone.EOF Then
varInDNC = -1
MsgBox "This Phone Number is in a DNC Database."
'What to do if they don't exist
'MsgBox "End of File"
Else
If IsNull(Me.Phone) Then
MsgBox "No Number Entered."
'What to do if they do
End If
End If
Set rsPhone = Nothing
End Sub