Too many client tasks

D

Doug

This is a work around that might work for anyone who receives the "too
many client tasks" message when Refreshing All queries in Excel
through the Access ODBC driver. I use Excel VB (I am certainly not an
expert in this area) to run each query one at a time. It seems to run
slower than refresh all, but it does seem to run. Note: this runs all
queries on the active worksheet, not all queries in the active
workbook.

Dim intQryct As Integer

intQrycount = ActiveSheet.QueryTables.Count

Dim n As Variant

For n = 1 To intQrycount

ActiveSheet.QueryTables(intQryct).Refresh BackgroundQuery:=False

Next

Improvements to this code are very welcome!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top