我需要缩小访问报告中可以提取的数据?

时间:2019-04-05 17:15:59

标签: ms-access ms-access-reports

如果要在RR之后的5到7天之间显示OFFICE下的水费。如果7天后显示在RECEIVED AFTER WELL CLOSED下,则5天以下的所有内容都显示在FIELD下。

这是正在使用的当前代码,尚未更新以反映上述条件:

Entry: IIf(Date()>=[RR]+5,"OFFICE","FIELD")

2 个答案:

答案 0 :(得分:1)

您可以使用switch函数来完成此任务:

switch
(
    Date()-RR >  7, "RECEIVED AFTER WELL CLOSED",
    Date()-RR >= 5, "OFFICE",
    True, "FIELD"
)

答案 1 :(得分:0)

将另一个if条件嵌入到公式中:

IIf(Date()>=[RR]+7,"RECEIVED AFTER WELL CLOSED",IIf(Data()>=[RR]+5,"OFFICE","FIELD"))