Excel Run-time error '1004' General ODBC Error


Joined
Oct 17, 2013
Messages
2
Reaction score
0
I have a query link in excel to get the data from access. But when I set it as automatically refresh, sometimes it will come out with this error information.

Run-time error '1004'
General ODBC Error

Below is my code. Anybody can help me? Thank you!

Sub AutoRefreshAll()
'
' AutoRefreshAll Macro
'
'
ActiveWorkbook.RefreshAll
Application.OnTime Now + TimeValue("00:03:00"), "AutoRefreshAll"
End Sub



Private Sub Worksheet_Change(ByVal Target As Range)
Sheets("Pick Done by DD").PivotTables("DeliveryDatePick").RefreshTable
Sheets("Picker PivotTable").PivotTables("PickerPicking").RefreshTable
Sheets("PickerCount").PivotTables("picktime1").RefreshTable
Sheets("PickerCount").PivotTables("PickTime2").RefreshTable
Sheets("PickerCount").PivotTables("PickTime3").RefreshTable
Sheets("PickerCount").PivotTables("PickTime4").RefreshTable
Sheets("PickerCount").PivotTables("PickTime5").RefreshTable
Sheets("PickerCount").PivotTables("PickTime6").RefreshTable
Sheets("PickerCount").PivotTables("PickTime7").RefreshTable
Sheets("PickerCount").PivotTables("PickTime8").RefreshTable
End Sub
 
Ad

Advertisements


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