Solved insert into table after delete

data_guy

New member
Local time
Today, 21:41
Joined
Jun 3, 2019
Messages
6
hello,

I want any deleted record from an access table to be inserted into another table. This second table will capture all my deletions. some assistance on how to go about it will be much appreciated. thanks
 
Hello and welcome to AWF. Although what you want to do is possible, the better way to do this is to have a field in your table that flags a record as deleted and then use a query to include/exclude them as needed.
 
Agree with Nautical. This isn't how databases are to work. Data isn't supposed to be moved around different tables; its to be related and designated. You simply add an [InActive] field to a record and when set to True it represents deleted.

Perhaps you can explain what real world process you are modeling in your database and give the reasoning for why a record would be deleted, but not deleted deleted.
 
Thank you Nautical, I think your better option solves my issue. i just want a way of keeping track of records not needed again. flagging them and excluding them in queries will help. 🤝
Hello and welcome to AWF. Although what you want to do is possible, the better way to do this is to have a field in your table that flags a record as deleted and then use a query to include/exclude them as needed.
 
Agree with Nautical. This isn't how databases are to work. Data isn't supposed to be moved around different tables; its to be related and designated. You simply add an [InActive] field to a record and when set to True it represents deleted.

Perhaps you can explain what real world process you are modeling in your database and give the reasoning for why a record would be deleted, but not deleted deleted.
thanks plog. I'm not deleting any records per your advice. you've shown me the better way

i was looking at a situation where a user inputs incorrect data in a record or a customer table where a customer is deceased. in that instance, these records need to be deleted from the table but backed up in another table. however, you've taught me better. thank you.🤝
 
Just a suggestion but rather than using a yes no field use a date field. If populated then the record is ‘deleted’. Benefit is it gives a ‘when’ a record is no longer to be referenced. This matters if you are doing historical analysis such as monthly or annual comparison of record numbers or you want a record to be ignored at some point in the future for example
 

Users who are viewing this thread

Back
Top Bottom