I have an Access Db that lots of automated reports write an error report to with a date/time stamp in the format 'dd-mmm-yyyy hh:mm:ss'. I'm currently pulling stats from this table using this statement:
sSQL = "SELECT COUNT(ErrorCode) FROM ErrorsTbl WHERE ErrorReport='" & ReportName & "' AND ErrorDate>#" & Now - 28 & "#;"
(issued in VBA)
However, if a report tries to save outputs to 5 different locations while the drive is disconnected, for example, then it'll write 5 different error reports to the db. Therefore, I need to pull the number of days a report has logged an error in the last 28 rather than a count of errors logged.
If my date and time fields were split I think I could figure it out, but since they're merged....and it's a major code rewrite of 200 ish reports to split them....can someone please help me with the SQL to pull this?