B
Bigbob
I'm trying to copy the last record of a table to the new record. Can't find a
macro command to do it with.
macro command to do it with.
gllincoln said:Hi Bob,
From your discussion, I guess the last record would be designated as the one
with the biggest/newest timestamp? Assuming this is true for the moment,
then the last record could be isolated using that information -
SELECT TOP 1 * FROM [mytable] ORDER BY [mytimestamp] DESC;
This should give you a recordset containing one row of data - the most
recent record.
Not sure (without using VBA) the best way to proceed at this point.
We could append this recordset (minus the primary key and substituting Now()
as mytimestamp) to the database, sort the record source by mytimestamp
desc(ending) and move to the first record - that would get us to a copy of
the last record as our new record.
Personally, I'd probably use VBA & DAO to set a form's unbound controls to
the values contained in the last record, let the user edit what they wished
and click a Save New Record button to insert their new record into the
database.
Hope this helps,
Gordon
bigbob said:It's mainly numbers to 3 decimal points with date/time stamps for
tracking.
The reason I went with access is the huge amount of data, approx. 1000
data
points we plan to track changes on. My reasoning was that a database will
be
able to handle the large quantity of data faster than excel. Additionally
we
wanted to make it as easy and fast as possible for techs to enter their
data.