+ Reply to Thread
Results 1 to 3 of 3

Error "run-time Error '1004': General Odbc Error

  1. #1
    Registered User
    Join Date
    12-21-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    4

    Error "run-time Error '1004': General Odbc Error

    Hi all,

    I really hope someone can help, I've been having awful problems with this. I'm having trouble running a file that I run weekly, when running the update query in an excel file I receive error message: "Run-time error '1004': General ODBC Error"

    When I run debug, it fails at the 2nd line of code below:

    Sheets("CCL").Visible = True
    Sheets("CCL").Range("A1").QueryTable.Refresh BackgroundQuery:=False
    Sheets("CCL").Visible = False
    Sheets("Planned").Visible = True
    Sheets("Planned").Range("A1").QueryTable.Refresh BackgroundQuery:=False
    Sheets("Planned").Visible = False
    Sheets("Unplanned").Visible = True
    Sheets("Unplanned").Range("A1").QueryTable.Refresh BackgroundQuery:=False
    Sheets("Unplanned").Visible = False
    Sheets("Summary Pivots").Visible = True
    Sheets("Summary Pivots").PivotTables("PivotTable6").PivotCache.Ref resh
    Sheets("Summary Pivots").PivotTables("PivotTable1").PivotCache.Ref resh
    Sheets("Summary Pivots").PivotTables("PivotTable4").PivotCache.Ref resh
    Sheets("Summary Pivots").PivotTables("PivotTable5").PivotCache.Ref resh
    Sheets("Summary Pivots").PivotTables("PivotTable7").PivotCache.Ref resh
    Sheets("Summary Pivots").PivotTables("PivotTable3").PivotCache.Ref resh
    Sheets("Summary Pivots").Visible = False
    Sheets("Summary").Activate
    Range("B4").Select
    End Sub

    My excel links the CCL data from Access via the below details and from what I know, nothing has changed. I've googled the error and it seems to mention an awful lot that there could be a problem with the link but I'm very inexperienced with Access and not quite sure where I should be looking.

    Work connection details:
    Connection string:
    DSN=MS Access Database;DBQ=R:\Reporting\Change Control Reporting Database\Database\CCL_Lookup.mdb;DefaultDir=R:\Rep orting\Change Control Reporting Database\Database;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;UID=admin;

    Command text:
    SELECT Combined.`Document Number`, Combined.`Date Registered`, Combined.`Date Implemented`
    FROM Combined Combined

  2. #2
    Forum Contributor
    Join Date
    10-07-2011
    Location
    Plano, TX USA
    MS-Off Ver
    Excel 2013
    Posts
    141

    Re: Error "run-time Error '1004': General Odbc Error

    Is the CCL sheet protected?

  3. #3
    Registered User
    Join Date
    12-21-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Error "run-time Error '1004': General Odbc Error

    No it's not protected

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1