Query returns duplicate records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form query that returns certain records twice. The scenario that
trips me up is when two instructors share a class instead of returning two
records (ok) it returns four of course two of them are exact dupes.

If I add DISTINCT or use a group by First, it barks that the database is
read-only when editing records.

Any thoughts?
 
There's two problems.

I bet that you have a table of classes and a table of instructors. This
leads to a many-to-many relationship which can cause duplicates. You need a
third table, a bridging or linking table, that shows which instructor is
teaching which class. This should clean up the dupes.

Another possibility is that your query doesn't have a join between the
tables. This causes a cartisien join which also displays dupes. Often
thousands of dupes so I don't think that this is the problem here.

As far as the problem with DISTINCT, that is strange. Is there user level
security enforced? Could this happed to be and MDE instead of MDB Access file?
 
Back
Top