I assumed the recordset was not currently available somewhere and it had to be created.
Public Function ClientExists(sFName As String, sLName as String, sAddress as String, sConnectionString as String) As Boolean
'Determine if the specified Client already exists in the database
Dim sSQL as String
Dim cn as ADODB.Connection
Dim rs as ADODB.Recordset
'Set ClientExists to False
ClientExists = False
'Open Connection
Set cn = New ADODB.Connection
cn.ConnectionString = sConnectionString
cn.Open
'Create SQL Statement
sSQL = "SELECT * FROM [tblTableName] WHERE [LastName] = '" & sLName & "' AND [FirstName] = '" & sFName & "' AND [Address] = '" & sAddress & "'"
'Open recordset
Set rs = New ADODB.Recordset
With rs
.ActiveConnection = cn
.Source = sSQL
.CursorType = adOpenStatic
.LockType = adLockOptimistic
.Open
'If a match is found the recordsets recordcount will be greater than 0
If .RecordCount > 0 Then
ClientExists = True
End If
.Close
End With
'Close recordset and connection
Set rs = Nothing
cn.Close
set cn = Nothing
End Function