RefreshLink has started failing with Error 3611 - Version 2312 (Build 17126.20014)

DaveBWC 20 Reputation points
2023-12-08T22:47:02.6333333+00:00

Having posted in the Community forum, it has been suggested that this is a better place to ask my question.

I have a split Access database that has started raising Error 3611 (Cannot execute data definition statements on linked data sources) in the frontend VBA code that refreshes links to tables in the backend. The statement that fails is RefreshLink.

We are currently using 32-bit Access, Microsoft 365 Version 2312 (Build 17126.20014) and get updates via the Current Channel. I was updated to this version yesterday (Dec-6-2023), before this I believe I was on Version 2311.

My question is why would RefreshLink complain that data definition statements are being executed?

The easiest way to replicate the error is with a copy of the Northwind Dev Edition sample database. Then create a new database and use External Data -> New Data Source -> From Database -> Access to create links to some tables in the Northwind database. Then place the following function in a module.

Function Relink()
    Dim Idx As Long
    Dim pos As Long
    Dim strPath As String
    Dim strFileName As String
    Dim strConn As String
    Dim strReconn As String
    
    Dim db As DAO.Database
    Dim tdf As DAO.TableDef
    
    strPath = CurrentProject.Path
    
    Set db = CurrentDb
    
    For Idx = 0 To db.TableDefs.Count - 1
    
        'Get connect string from tabledef
        Set tdf = db.TableDefs(Idx)
        strConn = tdf.Connect
        
        'Find linked tables
        If Left(strConn, 10) = ";DATABASE=" Then
        
            'Build string to reconnect to local database
            pos = InStrRev(strConn, "\")
            strFileName = Right$(strConn, (Len(strConn) - (pos - 1)))
            strReconn = ";DATABASE=" & strPath & strFileName
            
            'Relink to local database
            tdf.Connect = strReconn
            tdf.RefreshLink  'Errors with 3611 in v2312
        End If
        
    Next Idx
    
    Set tdf = Nothing
    Set db = Nothing
    
End Function

Save this database in the same folder as the Northwind database. With Version 2312 when you run the Relink function it will fail with Error 3611. I execute the code from the Visual Basic editor.

This looks to be a bug in version 2312, or has there been a change to the behaviour of the RefreshLink statement? If it's not a bug what am I doing wrong?

Any help or guidance would be appreciated.

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
5,125 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,989 questions
Access Development
Access Development
Access: A family of Microsoft relational database management systems designed for ease of use.Development: The process of researching, productizing, and refining new or existing technologies.
881 questions
Office Management
Office Management
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Management: The act or process of organizing, handling, directing or controlling something.
2,174 questions
0 comments No comments
{count} votes

Accepted answer
  1. Colin Riddington 85 Reputation points
    2023-12-09T09:31:07.1166667+00:00

    As mentioned at Utter Access forum, I have the same issue and reported it to the Access team yesterday. I have already had an acknowledgement of the issue and will report back on the timescale for a fix once I am able to do so.

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. DaveBWC 20 Reputation points
    2023-12-10T10:52:30.71+00:00

    Post on Utter Access forum reports that this is indeed a bug and has been confirmed by the Access team that it will be fixed before Version 2312 is released to the Current Channel.

    0 comments No comments

  2. Colin Riddington 85 Reputation points
    2023-12-24T23:36:25.6366667+00:00

    Sorry - forgot to report back earlier.

    This error was fixed on Mon 11 Dec - see https://isladogs.co.uk/error-3611-refresh-links/


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.