Show last inputted date in next form

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

Guest

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!
 
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
 
Back
Top