queries are returning double records

Jason1

Registered User.
Local time
Today, 13:49
Joined
Mar 12, 2010
Messages
63
Hello,

I am using access 2007.

I have checked my table, and the record is only entered once, but when I run the query to sort the table, it returns double records. The table would look something like the Column 1 (name) Column 2 (w.o.) Column 3 (boxes).

There would be a name in the name column, and work order number (w.o.) in the W.O. column, and a box amount in the boxes column.

The query askes for all of the records for a certain name. But for some reason some of the records are coming up twice. (exact duplicates). It seems like it only happens if there are two entries for a person on the same work order. So if Sam has a record stating he did 10 boxes on w.o. #3, and another saying he did 30 boxes on w.o. #3, then it will return both of those records twice (4 total records).

Any idea what could be causing this?

Thanks,
 
It would help to see the SQL of the query, but my guess is that there are two tables in the query, with no join between them.
 
Thanks for the help.

How would I go about posting the sql?
 
Figured out how to post the SQL. here it is

SELECT tblEmployees.First, tblPackerEntry.WorkOrderNumber, tblSku.Description, tblPackerEntry.NumOfBoxes, [NumOfBoxes]*[PackageAmount] AS [TOTAL PRODUCTS], ([TOTAL PRODUCTS]/[PackingTime])*60 AS [TOTAL PACKED], tblPackerEntry.PackingTime, tblSku.PackageAmount, tblWorkOrder.Sku, tblSku.Target, tblWOEntry.EndDate
FROM tblEmployees INNER JOIN (tblWOEntry INNER JOIN ((tblSku INNER JOIN tblWorkOrder ON tblSku.Sku = tblWorkOrder.Sku) INNER JOIN tblPackerEntry ON tblWorkOrder.WorkOrderNum = tblPackerEntry.WorkOrderNumber) ON (tblWOEntry.WorkOrderNum = tblWorkOrder.WorkOrderNum) AND (tblWOEntry.WorkOrderNum = tblPackerEntry.WorkOrderNumber)) ON tblEmployees.ID = tblPackerEntry.Packer
WHERE (((tblEmployees.First)=[Forms]![frmPackerReport]![Combo1]) AND ((tblWOEntry.EndDate)>#2/29/2012# And (tblWOEntry.EndDate)<#4/1/2012#));
 
I don't suppose you can post the db here? I was hoping it was a simpler query. My guess would be that one of those tables contains multiple records on the joined field where you're expecting one.
 

Users who are viewing this thread

Back
Top Bottom