Dlast Won't Update

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
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Usage of DLAST 5
DLast with If Statement 2
Insert Record and Change Sequential Number Field 3
DLast 2
DLast 12
DLast 2
Dlast returns incorrect Autonumber record 4
DLast Issue 2

Top