C
CJ
Hi Groupies
In my database, equipment is placed on a Rig via a Work Order. I need to be
able to retrieve the highest Work Order number for each piece of equipment,
the data needs to be editable (no grouping) and the name of the Rig needs to
be retrieved from a combo box on my form.
I have tried Max and DMax and I can get neither to do what I require and I
am beyond frustrated.
My query SQL is below:
SELECT tblWorkOrderDetails.[SKU Number], [strMake] & " - " & [Model] AS
Item, tblWorkOrderDetails.dtmDateIn, tblWorkOrderDetails.[Work Order ID],
tblWorkOrderDetails.[End Date], tblWorkOrders.RigName, tblWorkOrders.Status
FROM tblWorkOrders INNER JOIN (tblMake INNER JOIN (tblInventory INNER JOIN
tblWorkOrderDetails ON tblInventory.[SKU Number] = tblWorkOrderDetails.[SKU
Number]) ON tblMake.lngMakeID = tblInventory.Make) ON tblWorkOrders.lngWOId
= tblWorkOrderDetails.[Work Order ID]
WHERE (((tblWorkOrderDetails.dtmDateIn) Is Null) AND
((tblWorkOrders.RigName)=[Forms]![frmTruckToSite]![cmbRigSite]) AND (Not
(tblWorkOrders.Status)="void"))
ORDER BY tblWorkOrderDetails.[SKU Number];
Can somebody Please help me get this to work!!
In my database, equipment is placed on a Rig via a Work Order. I need to be
able to retrieve the highest Work Order number for each piece of equipment,
the data needs to be editable (no grouping) and the name of the Rig needs to
be retrieved from a combo box on my form.
I have tried Max and DMax and I can get neither to do what I require and I
am beyond frustrated.
My query SQL is below:
SELECT tblWorkOrderDetails.[SKU Number], [strMake] & " - " & [Model] AS
Item, tblWorkOrderDetails.dtmDateIn, tblWorkOrderDetails.[Work Order ID],
tblWorkOrderDetails.[End Date], tblWorkOrders.RigName, tblWorkOrders.Status
FROM tblWorkOrders INNER JOIN (tblMake INNER JOIN (tblInventory INNER JOIN
tblWorkOrderDetails ON tblInventory.[SKU Number] = tblWorkOrderDetails.[SKU
Number]) ON tblMake.lngMakeID = tblInventory.Make) ON tblWorkOrders.lngWOId
= tblWorkOrderDetails.[Work Order ID]
WHERE (((tblWorkOrderDetails.dtmDateIn) Is Null) AND
((tblWorkOrders.RigName)=[Forms]![frmTruckToSite]![cmbRigSite]) AND (Not
(tblWorkOrders.Status)="void"))
ORDER BY tblWorkOrderDetails.[SKU Number];
Can somebody Please help me get this to work!!