I have table TubeData with fields SerialNumber, DateReceived, Customer, Type, SalesOrder, PurchaseOrder, and Part Number.
Also have table CurrentLocation fields SerialNumber,DateMoved, Area, and PartNumber.
When the report is opened the user is prompted for SerialNumber and PartNumber.
The report opens and displays the field data from TubeData at the top of the page. Then should list the records from the CurrentLocation table matching the SerialNumber and PartNumber.
In the attached db. Open the Switchboard. Under Reports select Move History for Tube by Serial Number.
Enter the serial number 41049. Part number PS463
There are 2 records in TubeData for SN 41049. One received 8/9/10 and one received 12/17/10.
There are 12 records in CurrentLocation for SN 41049.
The report shows 24 records. Duplicating each record in CurrentLocation for each record in TubeData.
I added a 3rd record to TubeData for 41049 and the report then shows 36 records. Duplicating each record 3 times.
Here is the query used for the report:
SELECT TubeData.SerialNumber, TubeData.VmiPartNumber, TubeData.Date_Received, TubeData.Customer, TubeData.TubeType, TubeData.SalesOrder, [Current Location].SerialNumber, [Current Location].Area, [Current Location].[Date Moved], [Current Location].VmiPartNumber, TubeData.CustomerPO
FROM TubeData INNER JOIN [Current Location] ON TubeData.SerialNumber=[Cur
WHERE ((([Current Location].SerialNumber)=[S
erial Number:]) AND ([Current Location].VmiPartNumber=[P
art Number:] Or isnull([Current Location].VmiPartNumber)))
How can I eliminate the duplicate records in the report?