Results 1 to 2 of 2

Thread: INNER JOIN's

  1. #1
    Join Date
    Dec 1969

    Default INNER JOIN's

    Ok, I may be on the right track here. Order By is not working since I have nested loops, so can anyone see why this code may be dying? I just want to sort my results by tblcontacts.Lname (the persons last name): <BR><BR>strSQL = "SELECT * FROM (tblOrders tord INNER JOIN tblOrdersItems toi ON tord.OrderID = toi.OrderID) "<BR>strSQL = strSQL & "INNER JOIN tblContacts tct ON tord.CustID = tct.ContactID "<BR>strSQL = strSQL & "WHERE tord.OrderID = "&toi.orderid&" " &#039;this line is dying! why???<BR>strSQL = strSQL & "AND toi.ItemID = 52 "<BR>strSQL = strSQL & "AND tct.ContactID = "&tord.billtocontactid&" "<BR>strSQL = strSQL & "ORDER BY tct.LNAME ASC;"<BR><BR>tx for any help you can provide! :)

  2. #2
    Join Date
    Dec 1969

    Default can you PLEASE stick to one thread?

    netiquette!! if you&#039;re in the advanced forum you&#039;re expected to have some<BR><BR><BR>j<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts