I would use
Code:
Dim dbs As DAO.Database, rs As DAO.Recordset, strSQL As String
Add a debug statement to see if the SQL string isformed correctly:
Code:
'counts the instances of lateness for each employee
strSQL = "SELECT * FROM [qry_Instances_Of_Lateness] WHERE ((([qry_Instances_Of_Lateness]![Employee ID] )='" & Me.[Employee ID] & "'));"
Debug.Print strSQL
Set dbs = CurrentDb()
Set a breakpoint on the "Set dbs = " line to look at the immediate window.
Copy the SQL from the immediate window and paste into a new query. Does the query execute?