Skip to content

Commit

Permalink
Fix compatibility with latest Microsoft release
Browse files Browse the repository at this point in the history
In a recent update for Microsoft Access, Microsoft changed the behavior of the `Field2` object. We are changing our code to use the parent class instead. See https://nolongerset.com/bug-alert-dao-field3/ for details. Fixes #341
  • Loading branch information
joyfullservice committed Jul 13, 2022
1 parent 27a99c6 commit e901218
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
7 changes: 5 additions & 2 deletions Version Control.accda.src/modules/clsDbSharedImage.cls
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,11 @@ End Property
'
Private Property Set IDbComponent_DbObject(ByVal RHS As Object)

Dim fld2 As DAO.Field2
Dim rst2 As DAO.Recordset2
' IMPORTANT: These variables must be declared as the
' generic parent classes to avoid problems in newer
' releases of Microsoft Access. (See issue #341)
Dim fld2 As DAO.Field ' Field2
Dim rst2 As DAO.Recordset ' Recordset2

Set m_Rst = RHS

Expand Down
17 changes: 12 additions & 5 deletions Version Control.accda.src/modules/clsDbTheme.cls
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,13 @@ End Sub
'
Private Sub IDbComponent_Import(strFile As String)

Dim rstResources As DAO.Recordset2
Dim rstAttachment As DAO.Recordset2
Dim fldFile As DAO.Field2
' IMPORTANT: These variables must be declared as the
' generic parent classes to avoid problems in newer
' releases of Microsoft Access. (See issue #341)
Dim rstResources As DAO.Recordset ' Recordset2
Dim rstAttachment As DAO.Recordset ' Recordset2
Dim fldFile As DAO.Field ' Field2

Dim strZip As String
Dim strThemeFile As String
Dim strThemeName As String
Expand Down Expand Up @@ -549,8 +553,11 @@ End Property
'
Private Property Set IDbComponent_DbObject(ByVal RHS As Object)

Dim fld2 As DAO.Field2
Dim rst2 As DAO.Recordset2
' IMPORTANT: These variables must be declared as the
' generic parent classes to avoid problems in newer
' releases of Microsoft Access. (See issue #341)
Dim fld2 As DAO.Field ' Field2
Dim rst2 As DAO.Recordset ' Recordset2

Set m_Rst = RHS

Expand Down

0 comments on commit e901218

Please sign in to comment.