Copy link to clipboard
Copied
Set Grab_AllSchedule = conn.Execute("SELECT * FROM schedule WHERE " &_
"(#"&FormatDateTime(xRouteStart)&"# between sch_time_start and sch_time_end AND #"&FormatDateTime(yRouteEnd)&"# between sch_time_start and sch_time_end) " &_
"And Driver_ID in (select ID from drivers where instr(Route_knowledge,'"&trim(RtID)&"')) " &_
"And sch_Day = '"&trim(RunDays(i))&"' " &_
"And (Vacation <> 'Yes' or Vacation is null)" &_
"And (sch_date between #"&FormatDateTime(trim(x),2)&"# and #"&FormatDateTime(trim(y),2)&"#) order by tot_per_Day,Rand_ID,Driver_fn,Driver_ln asc")
Copy link to clipboard
Copied
Copy link to clipboard
Copied