我有两个查询,第一个显示我将在报告中用作期末余额的金额余额。
我陷入困境的另一个查询应该显示期初余额。我收到这样的查询:
Edate By Month closingbal
April $ 30000
May $ 25000
June $ 27000
现在,我想要这样的查询:
Edate By Month closingbal
April 0
May 30000
June 25000
July 27000
我一个月的DLookup条件部分有问题。
Closingbal: Dlookup("[closing balance]","qryclosingbalaance","Edate By Month" =<"[Edate By Month]")
答案 0 :(得分:2)
字段具有空格,请使用[ ]
。 <=
不适用于月份名称。需要月份号。如果要保存月份名称,则需要转换为月份号。如果该字段实际上具有月份号,而它只是显示月份名称的查找,请尝试:
Closingbal: Dlookup("[closing balance]","qryclosingbalaance","[Edate By Month]=<" & [Edate By Month])