Hi Guy's i have searched quite a few times on this one
I have all results from this SL, (deliberately not pasted full code) as i beelive this is just an adjustment
So hopefully i can ask teh correct question here: records stored in tblRoutePLan may will have 1 record per (delTo) and (PostCode) there would only be 1 record, in tblEdit, there is 4 items for this Delto / Poscode
So tblRoute Plan will show DelNo, DelTo, Town, PostCode, Qty of 4
In tblEdit there is 2 under a certain status and 2 on another status (strStatus)
what do i need to change here to get the 2 records from 4 because there is a (not in) strStatus
so another way for me to ask, there are 4 records, the SQL will out put 4 because thats is the count but i am looking to change this to out put where strStatus is met which woydl be 2 of 4 records
if i need to post more, i can but hopefully this is just an adjustemt ?
Code:
sSQL = "SELECT tblRoutePlan.DelNo, tblRoutePlan.DelTo, tblRoutePlan.Town, tblRoutePlan.PostCode, tblEdit.Qty" _
& " FROM tblEdit" _
& " INNER JOIN tblRoutePlan ON tblEdit.PostCode = tblRoutePlan.PostCode" _
& " WHERE (((tblRoutePlan.RouteNo) = " & intRoute & ")" _
& " And ((tblRoutePlan.WeekNum) = " & iWeekThis & ")" _
& " And ((tblRoutePlan.DelDate) = #" & Format(dtDelDate, "mm/dd/yyyy") & " #)" _
& " And ((tblEdit.ShipmentDate) = #" & Format(dtShipDate, "mm/dd/yyyy") & " #)" _
& " AND ((tblEdit.Status) Not In ('" & strStatus & "'))" _
& " AND ((tblEdit.TotalBox) > 0))" _
& " ORDER BY tblRoutePlan.DelNo;"
Debug.Print sSQL