VBA - can't acces a .DAO database

VBA - can't acces a .DAO database

nicholas_provo
Contributor Contributor
816 Views
2 Replies
Message 1 of 3

VBA - can't acces a .DAO database

nicholas_provo
Contributor
Contributor

Dear all

 

We are working with some custom VBA code that uses an Acces database.

To acces the database we use the next lines:

nicholasprovo_0-1626108186943.png

Since this weekend the code stopped working on the following line: "Set ws = DBEngine.Workspaces(0)" and Inventor is stuck in a loop. My collegues also can't get it to run and we use this application daily.

 

After some testing we descided to run the code in Excel VBA.

The code works fine in Excel, so it seems it has to do something with Inventor VBA.

 

References for the project seems to be in order:

nicholasprovo_1-1626108291046.png

We use Inventor 2021 with the latest updates.

 

I know this is aspecific question but after a day day searching for answer we ended up nothing.

Does anyone have an idea?

 

Many thanks.

Nicholas

 

 

0 Likes
Accepted solutions (1)
817 Views
2 Replies
Replies (2)
Message 2 of 3

bradeneuropeArthur
Mentor
Mentor

Could you upload the complete code here?

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

Message 3 of 3

nicholas_provo
Contributor
Contributor
Accepted solution

Arthur

 

if you use the following lines:

 

Dim ws as DAO.workspace

set ws = DBEngine.workspaces(0)

 

it gets stuck.

 

I also found the solution this morning.

Seems like the reference "Microsoft Office 16.0 Acces database engine Object" was the main cause of the issue.

Most likey this happend due to Windows updates.

 

Reinstalling/repair in config. >> Programs >> "Microsoft Acces database engine 2016 (English)"

Fixed the issue. Should anyone have any trouble with this.