The point may be moot but, FWIW, pbaldy is most probably right. Neither "CINT" nor "INT" worked for me as I tested the casting. In my example (below) only Clng worked.
x = CurrentDb.OpenRecordset("SELECT COUNT(*) FROM MyBatch WHERE Clng(txtDate) = " & _
CLng(DateSerial(2024...