访问Qry标准 [英] Access Qry Criteria
问题描述
我正在尝试输入标准,这样我就可以将数据从上一年的10月提取到今天的日期。我不想每年进入设计视图来输入新标准。我创建了以下但它不起作用:
I am trying enter criteria that will enable me to pull data from October of the previous year to today's date. I don't want to have to go into design view each year to enter new criteria. I created the below but it isn't working:
在Date()和Year之间([TRAINING DT])= Year(Date()) - 1和DatePart( "m",[TRAINING DT] = 10)
Between Date( ) And Year([TRAINING DT]) = Year(Date()) - 1 And DatePart("m", [TRAINING DT] = 10)
请帮助
推荐答案
我正在尝试输入标准,这样我就可以将数据从上一年的10月提取到今天的日期。我不想每年进入设计视图来输入新标准。我创建了以下但它不起作用:
I am trying enter criteria that will enable me to pull data from October of the previous year to today's date. I don't want to have to go into design view each year to enter new criteria. I created the below but it isn't working:
在Date()和Year之间([TRAINING DT])= Year(Date()) - 1和DatePart( "m",[TRAINING DT] = 10)
Between Date( ) And Year([TRAINING DT]) = Year(Date()) - 1 And DatePart("m", [TRAINING DT] = 10)
类似于:
  ;   BETWEEN DateSerial(年(日期()) - 1,10,1)和日期()
BETWEEN DateSerial(Year(Date()) - 1, 10, 1) And Date()
如果您应用此条件的字段包含时间和日期,那么您可能需要稍微修改标准。
If the field to which you are applying this criterion contains the time as well as the date, then you may need to modify the criterion slightly.
这篇关于访问Qry标准的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!