I would like to make a function that will check the [SSN] field in the "Members_tbl" table for an existing entry.
Code:
Public Function FindMember(ByVal FindSSN As String)
Dim dbMembers As DAO.Database
Dim dbPath As String
dbPath = CurrentProject.FullName
Set dbMembers = OpenDatabase(dbPath)
Dim rsSSN As DAO.Recordset
Set rsSSN = dbMembers.OpenRecordset("Members_tbl", dbOpenTable)
With rsSSN.FindFirst(FindSSN)
If .NoMatch Then
MsgBox ("Not Found")
Else
MsgBox ("Found " & FindSSN)
End If
End With
End Function