Hi guys
I am using Access as a backend and Excel as a frontend. I want to count total number of records for todays where Time<13:01
Can anyone please modify the following code accordingly?
Please Login or Register to view this content.
Hi guys
I am using Access as a backend and Excel as a frontend. I want to count total number of records for todays where Time<13:01
Can anyone please modify the following code accordingly?
Please Login or Register to view this content.
if rs.Fields("Time")<"#13:01:00#" then Maybe??? Also, why not use SQL to give you the count?
"select count(ID) from table1 where Date = #" & Format(Now, "mm/dd/yyyy") & "# AND WHERE Time<='13:00'"
What are your data types? You seem to have date for the date, but is time a string value?
Hope this helps
Sometimes its best to start at the beginning and learn VBA & Excel.
Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
Available for remote consultancy work PM me
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks