Show last inputted date in next form

K

Kees

Hello

How can you show the date of the last record in the new form.
The date was typed in the last record

Thank you!
 
N

Nikos Yannacopoulos

Kees,

If dates in records are strictly increasing, so you are actually looking for
the maximum date in the table, it's pretty simple:
=DMax("[DateField]","TableName")

If this is not the case, then you need to make sure you capture the last
record and read the date field from there. Again, several options. If you
have an autonumber field (or any other field that you know is strictly
increasing), then built-in functions could still do it:
=DLookup("[DateField]","TableName","[AutonumberField]" = " &
DMax("[AutonumberField]","TableName"))

If there is no way to identify the last record by means of Min or Max on
some field, then you can use some code to access a RecordsetClone of the
form's recordset, go to the last record and read the value.

HTH,
Nikos
 

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