我用下面的语句为何提示未找到access库表中已存在的记录,请指点,thanks!!
1.tr1 = CDate(Trim(Str$(Form3.moday.Year)) + "-" + Trim(Str$(Form3.moday.Month)) + "-" + "1")
2.tr2 = CDate(Trim(Str$(Form3.moday.Year)) + "-" + Trim(Str$(Form3.moday.Month)) + "-" + Str$(n))
3.cond1 = "日期时间>=#" & tr1 & "# and 日期时间<=#" & tr2 & "#"
4.cond = cond1 + "and 姓名='" + Trim(Form8.Label2(i).Caption) + "'"
5.ado1.Recordset.MoveFirst
6.ado1.Recordset.Filter = cond
如果单独查找‘日期时间’则可找到相应记录,为何带了‘姓名’就不行呢?