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
 
Back
Top