Deletion of Forms and all of its 'records'

galvinjaf

Registered User.
Local time
Today, 11:09
Joined
Jan 5, 2016
Messages
108
Good Morning,

As I build my first database, I now realize that I may have missed a crucial step. I've created a database centered around my employees. I have created various sub-forms and tables with pertinent information that relates to incentives etc.

I've always had in mind that I would keep current employees in this databse, and delete any employees and their data if they were terminated. Well, the time has come and I need to delete an employee from the database. I do not have a 'delete' button if you will, and am wondering if there is an easy way for me to create some kind of button that will delete not only the form that my employee is in, but all corresponding data in all of the other tables based on the ID that is within. I'm afraid I'll be able to delete the employees record, but that their data will still be in other tables. I've placed a screen shot to give you an idea.

Any ideas?
 

Attachments

  • Employee.jpg
    Employee.jpg
    78.1 KB · Views: 66
Much depend of if you've the right relationship between tables with employees data and if the "Cascade Delete Related Records" is marked.
If they are right setup, then you only need to delete the employer in the main table and the database will do the rest automatic.
 
This makes sense. I'll be sure to check that out, and then give it a test. Thanks for the feedback.

-J
 
You might be better to have a LeavingDate field, then you can still see anything that they did but remove them from any active forms. You also still have their old records if they decide to return.
 
probably look into archiving the records to another database before deleting them.
 
You might be better to have a LeavingDate field, then you can still see anything that they did but remove them from any active forms. You also still have their old records if they decide to return.
Be careful about what information is stored about the employee when the person is resigned, in some countries it is illegal if the employee has not given its approval and the Data Protection Agency must be informed if you do it.
For example in my country, is Social security number illegal to store after the employee has resigned.
 
Be careful about what information is stored about the employee when the person is resigned, in some countries it is illegal if the employee has not given its approval and the Data Protection Agency must be informed if you do it.
For example in my country, is Social security number illegal to store after the employee has resigned.

This is a good point - we have a automated routine that resets passwords, changes logins and removes the employees personal details, but retains their name so that historical data (Lookups on work forms etc.) don't disappear.
 

Users who are viewing this thread

Back
Top Bottom