Hi guys,
I need help on my code.
cmb_HoursFrom/To contains 00:00-23:00. it run perfectly fine. but when my time is 01:00, 04:00, 07:00, 10:00, 13:00, 16:00, 19:00 and 22:00 it only displays the hour before it.
if i choose 00:00 to 04:00 it will only display 00:00 to 03:00.
i even try using >= and <= it still do the same. i even try to use the exact value not using the cmb_HoursFrom/To.
can you please help me.
thank you in advance.
ps. i apologize in advance, i'm still new to access.
I need help on my code.
Code:
Dim qry As DAO.QueryDef
Set qry = CurrentDb.QueryDefs("qry_Report")
qry.SQL = "SELECT tbl_Sample.* " _
& "FROM tbl_Sample " _
& WHERE TIME Between #" & Me.cmb_HoursFrom.Value & "# and #" & Me.cmb_HoursTo.Value & "# "
DoCmd.OpenReport rpt_DailyWW, acViewPreview
cmb_HoursFrom/To contains 00:00-23:00. it run perfectly fine. but when my time is 01:00, 04:00, 07:00, 10:00, 13:00, 16:00, 19:00 and 22:00 it only displays the hour before it.
if i choose 00:00 to 04:00 it will only display 00:00 to 03:00.
i even try using >= and <= it still do the same. i even try to use the exact value not using the cmb_HoursFrom/To.
can you please help me.
thank you in advance.
ps. i apologize in advance, i'm still new to access.
Last edited: