vb与access相连接,想查询记录,查询条件是在某段时间内,这个select怎么写,试了好多次都报错?
sql语句
报告日期 在 access 是时间/日期 型
"select * from 病历 where 报告日期 between " & " ' " & (Now - 400) & " ' " & " and " & " ' " & (Now - 200) & " ' "
执行就报错,请问怎么写
[解决办法]
修正一下
"select * from 病历 where 报告日期 between " & (Now - 400) & " and " & (Now - 200)
[解决办法]
select * from 病历 where 报告日期 between # " & (Now - 400)& "# and # " &(Now - 200)& "#
[解决办法]
"select * from 病历 where 报告日期 between # " & (Now - 400) & "# and # " & (Now - 200) & "# "