deletions moved not deleted

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

Guest

I would like to know if it is possible to move a record consisting of 5
fields to a new table and a date that this happened added to this record, at
the same time the form would show that the field has been deleted (at least
from the table that the form is based on) Is this possible?

Thanking you

Pat
 
pjy,
Lets say you're working with tbl1 and tbl2, and tbl1 has a unique key field identifier
like RecID.
You would do an Update query against tbl2 by identifying the tb1 record through it's
RecID.
Then run a Update query against tbl1 to delete the record with that same RecID.

Not sure why you need to indicate in tbl1 that such and such record was "deleted", once
it's deleted, that record is gone from tbl1. You could add a field to tbl1 called Status,
and after you Update tbl2 with that record, the Status field in tbl1 could be updated to
"DELETED"... but the record (and RecID) will still be there.
 
The solution somewhat depends on requirements. If reliability is critical,
then it is better to open and close the tables each time a record is
deleted. For best performance, it is better to open the two tables when the
form is loaded and close the tables when the form is unloaded.

Oh, and I think that what you are describing could be called "archiving". It
sounds as if you want to archive some records.

The table you are archiving to simply needs to have the same fields as the
table you are archiving from, except an additional field for the date. Then
when a record is to be deleted/archived, copy the 5 fields from the record
being deleted to a new record in the table of archived records, then set the
date in the new table to the current date. Then add the new record and
delete the old record.

As for showing that the record has been delete, I don't understand what you
mean.
 
Back
Top