View Full Version : get data


Humberto
01-18-2002, 08:04 AM
Is there a way of making a query to go to the last record of a table and get data from a field and copy it to a different field in a form??? All help will be appreciated.

Pat Hartman
01-18-2002, 10:04 AM
Last in what sense? Physically last, maximum primary key value, most recently entered.

Physically last is not possible to ascertain. Jet uses it's own method of storing and retrieving rows and at a given point in time it is quite possible for the first record ever added to be physically last in the table. Tables are NOT like sequential files.

Maximum primary key value - use DMax() to find the record.

Most recently entered - requires a column that the users cannot update that has a default value of Now() - use DMax() to find the record.

Humberto
01-18-2002, 04:55 PM
Thank you for your response. It is the most recently entered. with Now() and dMax I can find the last record, but can I get one of the fields of that last record and copy it to another field? if yes, can you provide me with an example. thank you