我正在使用MS Access 2010并且正在编写一个程序来显示36个月内要支付的租赁金额。一旦我将合同输入表中,我就使用以下表达式:
Charge: IIf(Date()>[1StartDate] And (Date())<=[2StartDate],[1Sched],
IIf(Date()>[2StartDate] And (Date())<=[3StartDate],[2Sched],
IIf(Date()>[3StartDate] And (Date())<=[4StartDate],[3Sched],
IIf(Date()>[4StartDate] And (Date())<=[5StartDate],[4Sched],
IIf(Date()>[5StartDate] And (Date())<=[EndDate],[5Sched],"0")))))
这显示了要开具发票的正确租金金额,但我希望显示整个36个月的时间表,这样当我运行批量发票时,一次一个特定的月份将被处理掉。我怎么能做到这一点?