Thanks for that. I do have a date field which is automatically filled in
when the record is created and with the date in Short Date format.
If I set the default value of this field to Now(), wont that also add time
to the field. If 10 minutes after creating the record I want to run the
routine which tries to select the record where [Date Field] = now() surely
it wont select the record will it ( or am I missing something ((very
probably!)))
Alex wrote:
Is there an easy way to select the last record entered into a table - the
record has an autonumber ID field if that helps.
"Marshall Barton" wrote
Not without a field that can be used to determine "last".
Since an autonumber primary key only guarentees uniqueness,
not any kind of sequence (they might be random numbers or,
in some cases, even text strings). you can not reliably use
that to do what you ask.
Usually, "last" means the most recent date/time, so your
table should have a field with the date/time that the record
was created. This is trivial to do by setting the field's
DefaultValue property to Now(). Now your form's record
source can be a query that sorts the records on the creation
date field and the last record in the form's recordset will
be the last record created.