Filtering To get the Last Revalued amount where ther are multiple revaluations (1 Viewer)

CresolZim

Registered User.
Local time
Today, 11:04
Joined
Mar 22, 2019
Messages
11
Hi Folks
I have a fixed Assets program which keeps records of company fixed Assets.There is a facility for revaluing the Fixed Assets periodically and the program works fine.Now it has become necessary to revalue some assets more than once per year and the query that reports revaluation movements per year is now duplicating values. The Revaluation movement is the difference between the Purchase price and the last Revalued amount.An Assets which has been revalued will have a value in the last revalued date field in the Revaluation History table.The filtering I want is for the program to select the revaluation movement based on the Difference between the purchase price and the last revalued amount for assets , where an assets has been revalued more that once this value should be based on the last revalued transaction for that asset.

I have tried this code with no success
AMaxValue: DMax("RH_ID","QryAssetsCostsR","Assetid"="Assetid")


It Fetches all the records
Can Someone Please help
 

jdraw

Super Moderator
Staff member
Local time
Today, 04:04
Joined
Jan 23, 2006
Messages
15,378
Do you record revaluationDate when you revalue an asset?
If so, use the latest revaluationDate to find the latest revaluationValue.
 

CresolZim

Registered User.
Local time
Today, 11:04
Joined
Mar 22, 2019
Messages
11
Yes I have it . But I thought this would be the same as using the RH_id since it is based on the Autonumber of the Revaluation History . So it should pick the bigger value where there are more that 1 asset ID..
 

jdraw

Super Moderator
Staff member
Local time
Today, 04:04
Joined
Jan 23, 2006
Messages
15,378
Autonumbers are not necessarily sequenial. They're are for unique values only.
I would use revaluationDate.
 

Users who are viewing this thread

Top Bottom