Well...here it is...
SELECT [Service - Docket Table].DocketTableIndex, [Service - Docket
Table].WorkorderID, [Service - Docket Table].EmployeeID, [Service - Docket
Table].CustomerID, [Service - Docket Table].AccountNo, [Service - Docket
Table].UpdateEmployee, [Service - Docket Table].UpdateDate, [Service - Docket
Table].UpdateTime, [Service - Docket Table].DocketDate, [Service -
Concentrator Deliver].ConcentratorTypeDelivered, [Service - Concentrator
Deliver].ConcentratorSerialNo, [Service - Concentrator
Deliver].ConcentratorHours, [Service - Concentrator Deliver].ServiceDate,
[Service - Concentrator Deliver].NextServiceDate, [Service - Concentrator
Details].[Concentrator Service Details], [Service - Concentrator
Return].ConcentratorTypeReturned, [Service - Concentrator
Return].ConcentratorSerialNo, [Service - Concentrator
Return].ConcentratorHours, [Service - Concentrator Return].ServiceDate,
[Service - Concentrator Return].NextServiceDate, [Service - Cyl Various
Delivered].[Various Delivered], [Service - Cyl Various Returned].[Various
Returned], [Service - Cyl D Delivered].[D Cylinders Delivered], [Service -
Cyl D Returned].[D Cylinders Returned], [Service - Cyl CL Delivered].[CL
Cylinders Delivered], [Service - Cyl CL Returned].[CL Cylinders Returned],
[Service - Cyl CM Delivered].[CM Cylinders Delivered], [Service - Cyl CM
Returned].[CM Cylinders Returned], [Service - Cyl G Delivered].[G Cylinders
Delivered], [Service - Cyl CS Delivered].[CS Cylinders Delivered], [Service -
Cyl CS Returned].[CS Cylinders Returned], [Service - Cyl E Delivered].[E
Cylinders Delivered], [Service - Cyl E Returned].[E Cylinders Returned],
[Service - Cyl G Returned].[G Cylinders Returned], [Service - Cylinders
Details].Cylinders, [Service - Regulators 1
Details].Regulator1ServiceDetails, [Service - Regulators 1
Deliver].Regulator1TypeDelivered, [Service - Regulators 1
Deliver].Regulator1SerialNo, [Service - Regulators 1
Return].Regulator1TypeReturned, [Service - Regulators 1
Return].Regulator1SerialNo, [Service - Regulators 2
Details].Regulator2ServiceDetails, [Service - Regulators 2
Deliver].Regulator2TypeDelivered, [Service - Regulators 2
Deliver].Regulator2SerialNo, [Service - Regulators 2
Return].Regulator2TypeReturned, [Service - Regulators 2
Return].Regulator2SerialNo, [Service - OCD Details].OCDServiceDetails,
[Service - OCD Deliver].OCDTypeDelivered, [Service - OCD
Deliver].OCDSerialNo, [Service - OCD Return].OCDTypeReturned, [Service - OCD
Return].OCDSerialNo, [Service - Concentrator
Service].ConcentratorTypeServiced, [Service - Concentrator
Service].ConcentratorSerialNo, [Service - Concentrator
Service].ConcentratorHours, [Service - Concentrator Service].ServiceDate,
[Service - Concentrator Service].NextServiceDate, [Service -
Trolleys].Trolley, [Service - Bags].Cannula, [Service - Bags].Tubing,
[Service - Bags].Bags, [Service - Docket Table].Package, [Service - Docket
Table].Comments
FROM ((((((((((((((((((((((((((((([Service - Docket Table] LEFT JOIN
[Service - Bags] ON [Service - Docket Table].WorkorderID = [Service -
Bags].WorkorderID) LEFT JOIN [Service - Cyl D Delivered] ON [Service - Docket
Table].WorkorderID = [Service - Cyl D Delivered].WorkorderID) LEFT JOIN
[Service - Cyl CL Delivered] ON [Service - Docket Table].WorkorderID =
[Service - Cyl CL Delivered].WorkorderID) LEFT JOIN [Service - Cyl CL
Returned] ON [Service - Docket Table].WorkorderID = [Service - Cyl CL
Returned].WorkorderID) LEFT JOIN [Service - Cyl CM Delivered] ON [Service -
Docket Table].WorkorderID = [Service - Cyl CM Delivered].WorkorderID) LEFT
JOIN [Service - Cyl CM Returned] ON [Service - Docket Table].WorkorderID =
[Service - Cyl CM Returned].WorkorderID) LEFT JOIN [Service - Cyl CS
Delivered] ON [Service - Docket Table].WorkorderID = [Service - Cyl CS
Delivered].WorkorderID) LEFT JOIN [Service - Cyl CS Returned] ON [Service -
Docket Table].WorkorderID = [Service - Cyl CS Returned].WorkorderID) LEFT
JOIN [Service - Regulators 2 Deliver] ON [Service - Docket Table].WorkorderID
= [Service - Regulators 2 Deliver].WorkorderID) LEFT JOIN [Service - Cyl D
Returned] ON [Service - Docket Table].WorkorderID = [Service - Cyl D
Returned].WorkorderID) LEFT JOIN [Service - Cyl E Delivered] ON [Service -
Docket Table].WorkorderID = [Service - Cyl E Delivered].WorkorderID) LEFT
JOIN [Service - Cyl E Returned] ON [Service - Docket Table].WorkorderID =
[Service - Cyl E Returned].WorkorderID) LEFT JOIN [Service - Cyl G Delivered]
ON [Service - Docket Table].WorkorderID = [Service - Cyl G
Delivered].WorkorderID) LEFT JOIN [Service - Cyl G Returned] ON [Service -
Docket Table].WorkorderID = [Service - Cyl G Returned].WorkorderID) LEFT JOIN
[Service - Cylinders Details] ON [Service - Docket Table].WorkorderID =
[Service - Cylinders Details].WorkorderID) LEFT JOIN [Service - OCD Deliver]
ON [Service - Docket Table].WorkorderID = [Service - OCD
Deliver].WorkorderID) LEFT JOIN [Service - OCD Details] ON [Service - Docket
Table].WorkorderID = [Service - OCD Details].WorkorderID) LEFT JOIN [Service
- OCD Return] ON [Service - Docket Table].WorkorderID = [Service - OCD
Return].WorkorderID) LEFT JOIN [Service - Regulators 1 Deliver] ON [Service -
Docket Table].WorkorderID = [Service - Regulators 1 Deliver].WorkorderID)
LEFT JOIN [Service - Regulators 1 Details] ON [Service - Docket
Table].WorkorderID = [Service - Regulators 1 Details].WorkorderID) LEFT JOIN
[Service - Regulators 1 Return] ON [Service - Docket Table].WorkorderID =
[Service - Regulators 1 Return].WorkorderID) LEFT JOIN [Service - Regulators
2 Details] ON [Service - Docket Table].WorkorderID = [Service - Regulators 2
Details].WorkorderID) LEFT JOIN [Service - Regulators 2 Return] ON [Service -
Docket Table].WorkorderID = [Service - Regulators 2 Return].WorkorderID) LEFT
JOIN [Service - Trolleys] ON [Service - Docket Table].WorkorderID = [Service
- Trolleys].WorkorderID) LEFT JOIN [Service - Concentrator Deliver] ON
[Service - Docket Table].WorkorderID = [Service - Concentrator
Deliver].WorkorderID) LEFT JOIN [Service - Concentrator Details] ON [Service
- Docket Table].WorkorderID = [Service - Concentrator Details].WorkorderID)
LEFT JOIN [Service - Concentrator Return] ON [Service - Docket
Table].WorkorderID = [Service - Concentrator Return].WorkorderID) LEFT JOIN
[Service - Concentrator Service] ON [Service - Docket Table].WorkorderID =
[Service - Concentrator Service].WorkorderID) LEFT JOIN [Service - Cyl
Various Delivered] ON [Service - Docket Table].WorkorderID = [Service - Cyl
Various Delivered].WorkorderID) LEFT JOIN [Service - Cyl Various Returned] ON
[Service - Docket Table].WorkorderID = [Service - Cyl Various
Returned].WorkorderID
WHERE ((([Service - Docket Table].CustomerID)=[Forms]![AMT]![Workorders by
Customer]![CustomerID]))
ORDER BY [Service - Docket Table].WorkorderID DESC;
Dirk Goldgar said:
So what's the SQL of the query? Anything unusual about it? Does it use
any VBA or user-written functions?
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
Many thanks but I'm still stumped.
Adam