Please Help..Microsoft Dao 3.6 Object Library conflict with Office 16 Object Library (1 Viewer)

uncleh

Member
Local time
Today, 21:01
Joined
Mar 1, 2020
Messages
31
Below code is select file folders in my win10+office 2019, i reference Office 16 Object Library first then reference Dao 3.6 Object Library ,its work.
BUT another computer win7+office 2019,, has error Microsoft Dao 3.6 Object Library conflict with Office 16 Object Library.
how to solve this problem?
thank you!
KHT

Private Sub CmdSelect_Click()

Dim fDialog As Office.FileDialog

Dim varFile As Variant

Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)

With fDialog

.AllowMultiSelect = False

.Title = "Select TrustedLocation"

.Filters.Clear

If .Show = True Then

For Each varFile In .SelectedItems

Me.TxtFolderPath = varFile

Next
End If

End With

End Sub
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:01
Joined
May 7, 2009
Messages
19,237
can you remove the "reference" (in VBA, tools->reference) of da0.3.6
 

uncleh

Member
Local time
Today, 21:01
Joined
Mar 1, 2020
Messages
31
hi,,arnelgp, thank you for your reply and help me again..

my other forms need da0.3.6 any other way no need reference for select folders?

 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:01
Joined
May 7, 2009
Messages
19,237
did it work for you?
 

uncleh

Member
Local time
Today, 21:01
Joined
Mar 1, 2020
Messages
31
remove the "reference" (in VBA, tools->reference) of da0.3.6 its work but other forms not work...
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:01
Joined
May 7, 2009
Messages
19,237
in a2016/2019 these are the reference, if you don't have them, try to reference them:
reference.png
 

uncleh

Member
Local time
Today, 21:01
Joined
Mar 1, 2020
Messages
31
i have tried to reference this

conflict with Dao 3.6 Object Library also

 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:01
Joined
May 7, 2009
Messages
19,237
it is better to Create New database (a2016).
then import all your tables, forms, report, etc. from your old DB to this new database.
this will remove that dao 3.6 (this is old reference, not really needed in A2016/2019/2021).
 

uncleh

Member
Local time
Today, 21:01
Joined
Mar 1, 2020
Messages
31
Lots of forms and Functions need modify.
 

Attachments

  • 2021-10-27_161517.jpg
    2021-10-27_161517.jpg
    110.2 KB · Views: 367

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:01
Joined
May 7, 2009
Messages
19,237
you don't need to modify, leave it as is. that is not the problem.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 14:01
Joined
Sep 12, 2006
Messages
15,653
fwiw, My Access mdb's when opened with A2016 sill show the DAO 3.6 library, but do not show your fourth library.

Maybe that one is an ADO library.
I would be inclined to swap them over, and see if that fixes the problems.
 

uncleh

Member
Local time
Today, 21:01
Joined
Mar 1, 2020
Messages
31
you don't need to modify, leave it as is. that is not the problem.
most of Functions not working like below:
need DAO 3.6 library


Public Sub RemovePrefixDBO()
Dim dbs As Database
Dim tdf As TableDef
Dim strNewName As String
Dim strName As String
Set dbs = CurrentDb
For Each tdf In dbs.TableDefs
strName = tdf.Name
If UCase(Left(strName, 3)) = "DBO" Then
strNewName = Right(strName, Len(strName) - 4)
tdf.Name = strNewName
tdf.RefreshLink
End If
Next
End Sub
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:01
Joined
May 7, 2009
Messages
19,237
declare them "properly", Database object can be ADO or DAO.
use DAO for consistency:

Dim dbs As DAO.Database
Dim tdf As DAO.TableDef
 

Users who are viewing this thread

Top Bottom