Requery Duplicating Records

JenNorthwood

Registered User.
Local time
Today, 11:36
Joined
Apr 17, 2003
Messages
24
hi There,

I have a form that I input some information, but in the query it is duplicating records. I have attached the db for the problem. The query is called Duplication.

I entered the data:
"To Stop a theif" Video, 02/02/03 (date), 1 hr (course lenght) and only one person "sheryl Zaporazan". Then when I run the query it addes the previous 6 people that I entered for "To Stop a theif" Video on a different date. I have tried everything that I can think of for the relationships to get it to work.

Please help.

Thanks,
Jen
 

Attachments

The problem is with tblEmployeeTraining. This table lists the courses and dates that the course was given. It also includes course length. That means that the same course can appear in this table multiple times on the same day or on other days. This table needs a primary key and it does not currently have one. You are linking tblCourseCompleted to this table on tranininID which is NOT the primary key of this table. So what happens is that you think you should get one row returned where in fact you are getting several. If you add a PK to tblEmployeeTraining and modify tblCourseCompleted to link to the PK rather than TraningID, your problem should be solved.

I have seen this db before and I am sure that I pointed out the problem then. I would include the course length with the course so that instead of having 1 course with two possible lengths, I would have two separate courses. They can't be the same course anyway if one can be delivered in 3 hours and the other takes 2 days. Their content must be different.
 
Thank you pat,

I finally figured out how to make it work.
 

Users who are viewing this thread

Back
Top Bottom