Employee's records are deleted when i delete the Course

othmanyg

Registered User.
Local time
Today, 11:54
Joined
Feb 1, 2000
Messages
43
Hello to all of you excellent supporters.

I have a problem with my employee training database. I have a form to schedule an employee for a course. When i check employee's training schedule and delete any course employee is registered at, it delete the employee's records from the database. What's the solution, i don't want to delete employee's record when i delete any course he'll attend.

Second thing, under reporting switchboard, i want to be able to have a combo box to select reporting by Unit, now it gives me a report of all units course schedule.

Your help will always be highly appreciated. (I attached the database here to be more clear)
 

Attachments

Your Db needs a little work to make it efficient. I have posted some corrections to your Data structure primarily (although there are gaps as your Schedule table has employees who do not have a record) and an example of how you could update your employee Courses form. My corrections are by no means the polished article and are just quick fixes to your structure.

Get back with any questions.
 

Attachments

Thanks very much but now how can i register two employees in the same class, the way it is structured now don't allow me to do so.

I also need to know how i create a combo box from which i can select a report by unit.

Ur help is much appreciated.
 
Yes it will. I have just re-tried with the Db I posted and It works fine - Try adding an employee to a particular course. Despite restructuring your Db to a (more) normalised structure, I do not think that your data is most efficiently structured for the type of application you have in mind.

I have set up a Many-Many structure using a junction table that allows many employees to be a course and an employee to be on many courses. This is the most basic structure for a many-many join.

If my changes are not what you are looking for, explain in a little more detail how you want to be able to enter your data. Eg, do you want to show which courses an employee is on, which employees are on a particular course (and limit the numbers for example) as at the moment, your forms are showing all employees and all courses which makes it hard to read and maintain.

If I have time (if the pesky patients do not come in ;) ) I will try to use your example to show you how I would display your data to the user.
 

Users who are viewing this thread

Back
Top Bottom