Last record entered

G

GeorgeF

I have an Access 2003 table to collect labor hours by employee number and a
form to interact with the table. It would be useful to open the form with the
data from the last record entered chronologically. I tried using Dlast as a
default value for employee number but it returns a seemingly random record
rather than last entered. The table includes a date field and a unique
autonumber field so it knows the last record. I just don't know how to
retrieve it.

Thanks
 
D

David C. Holley

Put a SORT DESCENDING on the QUERY or SQLStatement used for the form's
recordsource
 
G

GeorgeF

I tried a 'sort descending' on my record set but I get the first record
chronologically rather than the last (using Dlast or Dlookup for my default
form text box). If I sort ascending I get a seemingly random record. I've
tried to go to last record on form open as well as several ideas I've seen in
this discussion group but nothing seems to be able to give me the field
values of the last record entered as my default text box values when opening
the form.
 

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

Top