G
Guest
Hi,
I have this query that has a calculated field thus:
DTD:
Nz(DateDiff("d",[DateAcquired],Forms!AssetsGeneralDepreciationSchedule!AsAt),0)*[EstimatedValue]*DLookUp("[DepreciationRate]/365","AssetsGeneralCategory","[CategoryID]=" & [AssetCategory])
When I run it, it asks for the value of:
Forms!AssetsGeneralDepreciationSchedule!AsAt. If I supply it, say today's
date, expected values are returned. Otherwise, 0 is returned on account of
the NZ function. So far so good.
On the form named AssetsGeneralDepreciationSchedule, on which the textbox
AsAt (formated to dd-mmm-yyyy) resides, however, the value consistently
returned is 0. It appears that the query does not recognize
Forms!AssetsGeneralDepreciationSchedule!AsAt on the form itself.
What am I doing wrong?
I have this query that has a calculated field thus:
DTD:
Nz(DateDiff("d",[DateAcquired],Forms!AssetsGeneralDepreciationSchedule!AsAt),0)*[EstimatedValue]*DLookUp("[DepreciationRate]/365","AssetsGeneralCategory","[CategoryID]=" & [AssetCategory])
When I run it, it asks for the value of:
Forms!AssetsGeneralDepreciationSchedule!AsAt. If I supply it, say today's
date, expected values are returned. Otherwise, 0 is returned on account of
the NZ function. So far so good.
On the form named AssetsGeneralDepreciationSchedule, on which the textbox
AsAt (formated to dd-mmm-yyyy) resides, however, the value consistently
returned is 0. It appears that the query does not recognize
Forms!AssetsGeneralDepreciationSchedule!AsAt on the form itself.
What am I doing wrong?