gpt4 book ai didi

mysql - VBA rs.filter Mysql日期之间

转载 作者:行者123 更新时间:2023-11-29 11:36:45 24 4
gpt4 key购买 nike

当前,我正在访问记录集

tmpQuery = SELECT * FROM someImportantTable 
WHERE(name like '% {Some Value} %')
AND date_field BETWEEN '{Some Value}' AND '{Some Value}';

然后做

set tmpRS = someDatabase.execute(tmpQuery)

我正在尝试减少打开到该表的重复连接的数量,所以我想做一个 rs.filter相反。

但是我似乎无法掌握语法

我假设它是这样的:

rs.filter = [name] LIKE '%%' AND [date_field] >= #01/04/2016# AND [date_field] <= #30/04/2016#

rs.filter = [name] LIKE '%%' AND [date_field] >= #2016-04-01# AND [date_field] <= #2016-04-30#

但是执行时它一直给我一个错误,我收到错误

enter image description here

最佳答案

尝试

rs.filter = "[date_field] >= #04/01/2016# AND [date_field] <= #04/30/2016#"

关于mysql - VBA rs.filter Mysql日期之间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36456976/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com