You have verified the contact name is in the table? (..just asking )
You will need to have a reference set for DOA, but try this:
Code:
Private Sub Command80_Click()
Dim rs As DAO.Recordset
Dim sSQL As String
Dim blnChk As Boolean
blnChk = False
'If contact is TEXT
' blnChk = DCount("*", "directors", "[contact] = '" & Me.[contact name] & "'") > 0
MsgBox Me.[contact name]
sSQL = "SELECT contact FROM directors WHERE [contact] = '" & Me.[contact name] & "'"
Set rs = CurrentDb.OpenRecordset(sSQL, , dbReadOnly)
If Not rs.BOF And Not rs.EOF Then
rs.MoveLast
MsgBox rs.RecordCount
blnChk = True
End If
rs.Close
Set rs = Nothing
If blnChk = True Then
MsgBox blnChk
DoCmd.OpenForm "directors", acNormal, , , acFormEdit, acWindowNormal 'Edit Mode
Else
'boolean can only be TRUE or FALSE. no need to check for FALSE since already checked for TRUE
' If blnChk = False Then
MsgBox blnChk
DoCmd.OpenForm "directors", acNormal, , , acFormAdd, acWindowNormal 'Add Mode
' End If
End If
End Sub