Error message regarding duplicate values

A

Aria

I'm still working on my first database and am inputting select data to test
it.
This is a school database which includes teachers who may belong to more
than one dept. and/or have more than one title. I have tables that account
for these relationships (tblDepts, tblDeptsEmps, tblTitles, tblTitlesEmps as
well as tblEmps).

Today, I tried inputting information for Co-Dept. Chairs and am receiving
the following message:
"The changes you requested to the table were not successful because they
would create duplicate values in the index, primary key, or relationship.
Change the data in the field or fields that contain duplicate data, remove
the index or redefine the index to permit duplicate entries and try again."

I have previously input data for other staff, substitute staff and
Administrators without a problem. I don't have the title listed as "Co-Dept.
Chair" but simply "Dept. Chair". The error message appears when I choose the
dept. I'm surprised that I am having a problem with this group since I have
numerous many-to-many relationships.

When I received the error, I checked my relationship window to be sure I
didn't forget something critical. I then checked the tables and corrected the
index to reflect "Yes, duplicates OK". This has not fixed the problem.

I had previously created a Find Duplicates query that contains the following
SQL:

SELECT tblEmployees.LastName, tblEmployees.FirstName, tblEmployees.EmpID
FROM tblEmployees
WHERE (((tblEmployees.LastName) In (SELECT [LastName] FROM [tblEmployees] As
Tmp GROUP BY [LastName],[FirstName] HAVING Count(*)>1 And [FirstName] =
[tblEmployees].[FirstName])))
ORDER BY tblEmployees.LastName, tblEmployees.FirstName;

I still have the same problem. Please, I would appreciate a little
direction. What have I overlooked?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top