改成这样
dr = DataTables("zj_证件明细表").SQLFind("计划占用日期起 <= '" & dtime.AddDays(i) & "' and 计划占用日期止 > '" & dtime.AddDays(i+1) & "'")