UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
2 Pages V < 1 2  (Go to first unread post)
   Reply to this topicStart new topic
> Question, Access 2016    
 
   
faca
post Jul 7 2019, 12:08 PM
Post#21



Posts: 53
Joined: 21-May 18



SELECT Parts.PartID, Parts.PartNumber, Parts.Code, Parts.Name, DeliveryDocuments.DeliveryNumber

FROM Parts LEFT JOIN (DeliveryDocuments LEFT JOIN DeliveryDocumentsParts ON DeliveryDocuments.DeliveryDocumentsID = DeliveryDocumentsParts.DeliveryDocumentsID) ON Parts.PartID = DeliveryDocumentsParts.PartID

WHERE (((Parts.PartNumber) Like "*" & [Forms]![frmReturn]![SearchPart] & "*")) OR (((Parts.PartCode) Like "*" & [Forms]![frmReturn]![SearchPart] & "*"));

with inner join its works
This post has been edited by faca: Jul 7 2019, 12:09 PM
Go to the top of the page
 
faca
post Jul 14 2019, 08:54 AM
Post#22



Posts: 53
Joined: 21-May 18



Nevermind i figured out why is not working .. im stupid crazy.gif

Problem is that now when i want to display all records ... each Part is multiplied with different DeliveryDocument

Example:

Part is:
ATE BRAKE DISCS

DeliveryDocumentNumbers are:
6534
43SA
54FF
00DD

Now i have like this:

ATE BRAKE DISCS - 6534
ATE BRAKE DISCS - 43SA
ATE BRAKE DISCS - 54FF
ATE BRAKE DISCS - 00DD

What i want is the part to be listed with last DeliveryDocument in this case -> ATE BRAKE DISCS - 00DD


Code:

SELECT Parts.PartID, Parts.PartNumber, Parts.PartName, DeliveryDocuments.DeliveryNumber

FROM Parts INNER JOIN (DeliveryDocuments INNER JOIN DeliveryDocumentsParts ON DeliveryDocuments.DeliveryDocumentsID = DeliveryDocumentsParts.DeliveryDocumentsID) ON Parts.PartID = DeliveryDocumentsParts.PartID
This post has been edited by faca: Jul 14 2019, 09:01 AM
Go to the top of the page
 
2 Pages V < 1 2


Custom Search


RSSSearch   Top   Lo-Fi    25th August 2019 - 06:10 AM