Code:
Dim SDaT As String
Dim CTiM As String
 SDaT = Format(Date, "dd/mm/yy")
 CTiM = Format(Time, "hh:mm")
     conn.connectionsettings="AW"
 Dim rs As New ADODB.Recordset
 Set rs = New ADODB.Recordset
 rs.Open "SELECT * FROM Attendance where RIC='rnames(fi)' & DateIn='SDaT' ", conn, adOpenStatic, adLockOptimistic, adCmdTable
 msgbox rs.RecordCount
i run the above code , but somehow i wasn't able to get any recordcount even though the record exist in the database but the code just by pass the msgbox rs.recordcount and execute the next line ? is any thing wrong with mine rs.open statement ?