View Single Post
  #5   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

Hi


"Jamie Collins" wrote in message
oups.com...

If I've followed correctly, you have a union query that operates on
sheets within the same workbook. I think I would have to classify that
scenario as 'querying an open workbook', although 'open' is admittedly
a very loose term in this context <g. Have you tried moving the union
query to a separate workbook to see if this resolves the problem?



I'll give it a try tomorrow. And I have another option too - really I used
it before for similar tasks, but I decided for more compact solution, as
number rows in source tables isn't limited this time. I'll place both
grouped queries on same sheet, p.e. first one starting from row 2, and
second one starting p.e. from row 10000 (I have to estimate maximal possible
number of rows returned by first query jet), set in query properties that
result tables are inserted without headers, enter manually headers into row
1, and define a named range p.e. from row 1 to row 20000, which will be the
source table for final query - this time a simple one with condition in
WHERE clause to exclude empty rows.


Arvi Laanemets