find last record with value

XaloRichie

Registered User.
Local time
Today, 05:11
Joined
Jul 2, 2003
Messages
70
i have a cashbook table and after cash up the Balance Carried forward is added as an entry. I need to be able to select the last BCF amount , after a weekend or holiday so i can not rely on date -1 as it may be 3 days ago that the till was last cashed up!
can anyone offer a suggestion?

I have tried this

=DLookUp("[BBF]","cashbook","[ChkDate]=Max([ChkDate])And [BBF]>0")

but get an Error
 
Last edited:
thanks

Can I use max([date]) and a condition eg. last recorded date where another field (Balance Carried Forward) is >0?
You see there could be many records on that date and I just want the one with a BCF figure.

If it is monday i need to get the BCF from saturday and put it into the form for mondays cash up.
 
Last edited:
Sort the recordset/query in DESCENDING order on your critical date, then take the first matching record you see. Or use a Find First query.
 

Users who are viewing this thread

Back
Top Bottom