Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default QueryTable Refresh Failed

I have an Excel vba module that loops through (several thousand) records in a
worksheet, and for each record performs a query (using Microsoft Query) to an
Access database; returning the query results to a QueryTable object in
another worksheet of the same Excel workbook. After the
QueryTable.CommandText statement, I have a QueryTable.Refresh
BackgroundQuery:=False statement.

My problem is that occasionally I receive the following error message:
Method 'Refresh' of object '_QueryTable' failed

I can restart the module at the record where it failed previously, and it
runs again correctly,for awhile, until it the Refresh method gives the same
error again.

Sometimes the module will correctly process the (same) entire set of
records, without this error message; and sometimes not.

I'm using Microsoft Office Professional Edition 2003; so this has Microsoft
Office Excel 2003 SP2 and Microsoft Office Access 2003 SP2.

Does anyone have any idea what can cause this behavior, or how I can prevent
the error from occuring, or how I can programatically recover from the error?

Thanks very much!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
QueryTable Last Refresh Date? LCK[_2_] Excel Programming 0 November 28th 07 05:46 PM
Update querytable connections and refresh data Dale Fye Excel Programming 0 November 2nd 07 03:46 PM
Querytable and pivot table refresh problem Robert Bravery Excel Programming 0 July 6th 07 02:34 PM
I need a QueryTable.Refresh solution Lucian Rosu Excel Programming 0 June 12th 06 11:11 AM
catching cancel on QueryTable.Refresh tysop Excel Programming 0 February 16th 06 12:48 PM


All times are GMT +1. The time now is 06:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"