If you update your recordset on line 151 to:
SELECT products.*, productcategories.*, productmanufacturers.*, productcategories_2.CategoryName AS parentcategoryname FROM FROM products LEFT JOIN productcategories ON products.ProductCategoryID = productcategories.CategoryID LEFT OUTER JOIN productcategories AS productcategories_2 ON productcategories_2.CategoryID = productcategories.CategoryParentID LEFT JOIN productmanufacturers ON products.ProductManufacturerID = productmanufacturers.ManufacturerID
Then you should be able to refer to the parentcategoryname column when you need to below.