MajP
You've got your good things, and you've got mine.
- Local time
- Yesterday, 23:46
- Joined
- May 21, 2018
- Messages
- 9,016
I will say it one more time, not sure what is not clear. If you are stuck on doing this with a query, well good luck. If you can switch to a SQL Server back end there are native recursive queries. In Access You do this in code and persist the solution and do not do it in a query. If you need a temp table so be it. This should take a second or two for your little 2k data set if you persist the solution to a table. You already said you plan to use this to update another table, so what is the problem? The problem with the query is that every record has to call the UDF. UDFs are pretty slow. That UDF opens a recordset. In my case each record opens a single RS. In your case it is even worse because it opens one for every record and then for each child record in the tree.t is impossible that there is no solution to this problem.
In any way, I want to activate this query update accounts without disrupting the user
Is it reasonable that not all Access programmers have a solution?
If you look at that tree view demo there is a 10K tree that loads in a half second on a single recursive table. Writing to a table would increase the time, but still should be fast.