So i am trying to write a function that will get the number of records between todays date and now, but its been failing
Dim dbs As DAO.Database
Dim rstBlock As DAO.Recordset
Set dbs = CurrentDb
Set rstBlock = dbs.OpenRecordset("select * from Customers where " & _
"AddedBy = '" & EmployeeID & "' and WhenAdded BETWEEN " & Format$(Date, "mm\/dd\/yy\/hh:mm:ss A2") & " AND " & Now)
Number = rstBlock.RecordCount
i tried formating date so i can do the comparison but no luck here
any help will be greatly appreciated
Dim dbs As DAO.Database
Dim rstBlock As DAO.Recordset
Set dbs = CurrentDb
Set rstBlock = dbs.OpenRecordset("select * from Customers where " & _
"AddedBy = '" & EmployeeID & "' and WhenAdded BETWEEN " & Format$(Date, "mm\/dd\/yy\/hh:mm:ss A2") & " AND " & Now)
Number = rstBlock.RecordCount
i tried formating date so i can do the comparison but no luck here
any help will be greatly appreciated
