Thanks for the feedback!
Have downloaded your suggestion and will check it out.
I am trying to run a Report on a Query.
The objective is to calculate accumulated depreciation on a Table listing the capital assets of the company.
The formula in the Query is:
Accum Depn: ([Purchase Price]/[Depn Period])*([# Months])
[Purchase Price] and [Depn Period] are input data.
# Months: IIf(DateDiff("m",[Asset Database]![Date],[Date Query Ranges]![As At Date])+1>=[Depn Period],[Depn Period],DateDiff("m",[Asset Database]![Date],[Date Query Ranges]![As At Date])+1)
The DateDiff() formula calculates the number of months from date of Purchase and the IIf() statement ensures the number of months of depreciation is not greater than the period allowed for the item purchased.
If I Sum() each of the 3 components of the formula separately the Report calculates an incorrect answer.
The Sum() needs to be on the whole calculation for it to be correct. MS Access Reports finds this 'too complex'.
The Query runs fine, it's the Report that isn't working.
If you have any suggestions to solve this within Access that would be great!
Tks again for your time and comments!