The following code gets me 90% of the results I require. Hopefully this is simple for someone, but I cannot figure out how to make a third JOIN, if that is the way to go. Currently I have a JOIN between products and rentals, and a JOIN between rentals and rentalsets, but I also need a JOIN between rentalsets and products...something like LEFT JOIN rentalsets ON rentalsets.productID = products.productID. But I do not know where to place some code to join rentalsets.productID to products.productID in the statement below.
Thanks in advance.
Code:
strSQL = "SELECT rentals.line, rentals.username, rentals.dateadded, rentals.movie, rentals.rentalout, rentals.rentalin, rentals.active, rentals.rank, products.productID, products.productName, rentalsets.productID, rentalsets.subproductID, rentalsets.description " & _
"FROM products " & _
"RIGHT JOIN (rentals LEFT JOIN rentalsets " & _
"ON rentalsets.subproductID = rentals.movie) " & _
"ON products.productID = rentals.movie " & _
"ORDER BY rentals.username, rentals.rank asc"
Thanks in advance.