add selected record to a different table

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

Guest

Hi all,
I'd like to implement something like a recycle bin in an Access form.
When the "delete" command button is clicked, it should first copy all the
information of the selected record to a "scratch" table before using
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
to remove it from the real table.

any idea how i can do that?

tia
 
Hi

!) If you have a status field you can change the status to "Deleted" and
requery, as long as the datasource is dependent on the status being within
certain bounds (order processing applications).
To Undelete set status back, which means a field for storing old value.
This field is usual if you have any status that acts as a "Hold",

2) You can execute an INSERT INTO query but that will not take into
consideration any unsaved values which might have their own validation
problems.

3) You can use DAO/ADO to populate the table and later undelete.

Option 1 is recommended, especially if you are using autonumber to populate
key fields.

OK? - John
 
Back
Top