Gustav Brock
Gustav at cactus.dk
Wed Jul 20 08:24:12 CDT 2005
Hi Bruce Have in mind that DAO may be superior regarding speed and ease of maintenance (no "special" fields needed, just the parent ID, thus no smart SQL). Lookup "Tree shaped reports" from 2002-06-02 in the archive. Maybe my function RecursiveLookup() can guide you ... This function uses a static recordset and Seek and runs blazingly fast. /gustav >>> Bruce.Bruen at railcorp.nsw.gov.au 07/20 1:16 am >>> Hi folks, I thought I had got over this one years ago and can't find the SQL query template someone (Lembit???) here kindly supplied last time. But it has come back to get me again, so.... Does someone have a "template" query to return all the parts in an n-level parts explosion, preferably in binary-tree pre-order order. * all components, subcomponents and parts are held in the same table, * it is a one way tree - i.e. parts that are used in multiple assemblies appear multiple times in the table (i.e.i.e. the pkey for the tree table is not the SKU)