I am not getting the correct data when use my simple ms access query ... I mean lets say I am looking for 2 (which is a number ) within the records... The result returns the sample " 53, 23, 24, 4, 43, 56, 55, 44, 59 "... Why is that ???
FindRouteID is Autonumber and Route_knowledge is text in ms access... Thanks all.
Set GetOnCalls = conn.execute("select * from realschedule where (Vacation <> 'Yes' or Vacation is null) And Training ='No' And (sch_route ='On call 2 - pm' or sch_route ='On call 2 - am' or sch_route ='On call 1 - pm' or sch_route ='On call 1 - am' or sch_route ='On call 1 - pm weekend' or sch_route ='On call 1 - am weekend') and sch_Day = '"&trim(RunDays(i))&"' and right(Sch_time_start,2) ='"&right(xRouteStart,2)&"' And Driver_ID in (select ID from drivers where instr(Route_knowledge,'"&cstr(FindRouteID)&"')) order by Driver_fn,Driver_ln")