Dlast Won't Update

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

How can i find a value from a field in the last record entered in my table?
I use Dlast function but it doesn't update if i enter a new record. I used
the following code in a label on a form. it worked the first time i created
the code but dont update when i enter a new record. any help will deep be
appreciated..
=DLast("[LodgeNo]","[Valuation Assessment]")

Thanks
 
The DLast and DFirst functions are pretty much useless. They don't do what
you think they do. Here is a quote from VBA Help

DFirst and DLast functions to return a random record from a particular
field in a table or query when you simply need any value from that field

Note "random" and "any value"

Unless you either time stamp your records or use an autonumber field, there
is no way to determine what the last entered record is. If you use an
autonumber or a time stamp field, you should use the DMax function.
 
Back
Top