Trying to get this to work. I make a simple select from a table called 'SH_Products' and for each product I want a numberic value for the number of images that product has within another table called 'SH_ProdGals'.
The Join happens on:
SH_Products.Product_ID = SH_ProdGals.ProdGals_ProdI
I have this sort of thing working on SQL. However, I now need to replicate it and get it going on Access too.
Abiel M de Groot
strSQL = "SELECT SH_Products.Product_ID, "&_
"FROM SH_Products left outer join (select SH_ProdGals.ProdGals_PicID, COUNT(*) as NumberOfImages from SH_ProdGals group by SH_ProdGals.ProdGals_PicID) SH_ProdGals on SH_Products.Product_ID = SH_ProdGals.ProdGals_ProdID WHERE SH_Products.Product_SubSiteID = " & Session("Subsite_ID") & " Order By SH_Products.Product_ID;"
Set rsData = MyConn.Execute(strSQL)
If Not rsData.EOF Then
ArrProds = rsData.GetRows()