代码如下:
Dim db As DAO.Database
Dim rsFilterProducts As DAO.Recordset
strSql = "Select * From tblProduct Where FProductID In (SELECT tblProduct_SKU.FProductID FROM (表_采购_物料数据 INNER JOIN tblOrder ON 表_采购_物料数据.FMaterialID = tblOrder.FMaterialID) INNER JOIN tblProduct_SKU ON 表_采购_物料数据.FMaterialID = tblProduct_SKU"
Set db = CurrentDb
Set rsFilterProducts = db.OpenRecordset(strSql)
Debug.Print rsFilterProducts.RecordCount