Question I keep getting: "microsoft.ACE.OLEDB.12.0 provider is not registered on the local machine"

chazrab

Member
Joined
Nov 11, 2022
Messages
23
Programming Experience
10+
...when I set the Datasource for Listbox1 on a new userform. Went through all steps to "register" this as directed in some yt vids. Relevant snips below. Brand new to VS. What am I doing wrong that VS keeps telling me ..."not registered on the local machine.? Per a YT vid, uninstalled Access DB engine, reinstalled Access Runtime, x86. O365 2016, 64 bit machine. Please help. Must be something simple(hopefully).

Thanks to anyone in advance.
cr
ESTABLISHING CONNECTION STEP.jpg
 

Attachments

  • ERROR MSG WHEN TEST CONNECTION BUTTON PRESSED.jpg
    ERROR MSG WHEN TEST CONNECTION BUTTON PRESSED.jpg
    109.2 KB · Views: 48
  • ESTABLISHING CONNECTION STEP.jpg
    ESTABLISHING CONNECTION STEP.jpg
    140.6 KB · Views: 49
  • ACCESS DB I'M TRYING TO CONNECT TO.jpg
    ACCESS DB I'M TRYING TO CONNECT TO.jpg
    129.5 KB · Views: 42
Last edited by a moderator:
Hi Skydiver. Doing it now from the link you provided. ..hope this is correct. CR
 

Attachments

  • CHECKED BOTH.jpg
    CHECKED BOTH.jpg
    36.4 KB · Views: 28
Yes.
 
These tells me I already have these files.
 

Attachments

  • MSG WHEN TRYING TO INSTALL1.jpg
    MSG WHEN TRYING TO INSTALL1.jpg
    76.5 KB · Views: 20
  • MSG WHEN TRYING TO INSTALL.jpg
    MSG WHEN TRYING TO INSTALL.jpg
    71.5 KB · Views: 19
The error is not saying that you already have these files. It is saying that you have a mismatched version of Office already installed.

My apologies regarding post #2 telling you to ensure that you to install both the 32-bit and 64-bit version of the MDAC drivers. They used to be able to co-exist side by side for older versions. It looks like for the 2016 version they are now forcing you to pick the version that matches your current Office installation.

Basically, the being reported in your post #1 is due to the fact that Visual Studio 2022 is running as now running as a 64-bit application. You'll need the 64-bit MDAC drivers installed. Obviously that will be an issue if you currently have 32-bit Office installed.
 
The error is not saying that you already have these files. It is saying that you have a mismatched version of Office already installed.

My apologies regarding post #2 telling you to ensure that you to install both the 32-bit and 64-bit version of the MDAC drivers. They used to be able to co-exist side by side for older versions. It looks like for the 2016 version they are now forcing you to pick the version that matches your current Office installation.

Basically, the being reported in your post #1 is due to the fact that Visual Studio 2022 is running as now running as a 64-bit application. You'll need the 64-bit MDAC drivers installed. Obviously that will be an issue if you currently have 32-bit Office installed.
Hi Skydiver - thx for replying back. I was getting discouraged and started to think about giving up trying to create my Excel/VBA Bible application in VS using it as a design model - your reply has got me re-encouraged - on this statement "Visual Studio 2022 is running as now running as a 64-bit application. You'll need the 64-bit MDAC drivers installed. Obviously that will be an issue if you currently have 32-bit Office installed."

There must be a link to download and install these drivers in O365. i Googled this quote and it took me to the page snip below. This is the correct download to make it work, I hope.

if this download works, then I should be able to populate Listbox1 on the userform with the Access DB and should show when I run the app. Thx again for staying in touch. cr
 

Attachments

  • DRIVER DOWNLOAD.jpg
    DRIVER DOWNLOAD.jpg
    98.3 KB · Views: 20
Update: uninstalled 32 bit, reinstalled 64 bit MS ACCESS DB Engine, MSgBox Test connection = Text "succeeded"
New Listbox1, new userform. Datasource same .accb1
 

Attachments

  • Datasource.jpg
    Datasource.jpg
    5.4 KB · Views: 24
  • SAME MSG AFTER DRIVER INSTALL.jpg
    SAME MSG AFTER DRIVER INSTALL.jpg
    115.9 KB · Views: 25
Check to see your project build properties. Make sure that you are building as x64, or if you are building as "Any CPU" that you don't have the "Prefer 32-bit" checked.
 
It's possible to install both 32-bit and 64-bit ACE but I'm not sure that you can install the same version of each. I was under the impression that it was possible but I've never read explicit instructions and it didn't work when I tried. What you can do is install both the 2016 and 2010 version of ACE with different bitness, so you're covered in both cases. If you have 64-bit Office installed, you can install 32-bit ACE 2010 and vice versa.
 
It's possible to install both 32-bit and 64-bit ACE but I'm not sure that you can install the same version of each. I was under the impression that it was possible but I've never read explicit instructions and it didn't work when I tried. What you can do is install both the 2016 and 2010 version of ACE with different bitness, so you're covered in both cases. If you have 64-bit Office installed, you can install 32-bit ACE 2010 and vice versa.
Snips show everything I've done (that I think is correct). That Listbox should populate with the Access database, but instead the continual error msg. Not wanting to overkill on snips, just showing everything I've done that
should cause Listbox to work. Obviously, VS is still saying "...not registered on local machine". Snip shows O365 version is 64 bit. Are there steps i'm missing that registers this file? Thx to all for the efficient help efforts. cr Kingwood, Tx
 

Attachments

  • SAME RESULT WHEN I RUN THE APP.jpg
    SAME RESULT WHEN I RUN THE APP.jpg
    111.6 KB · Views: 14
  • ACCESS VERSION.jpg
    ACCESS VERSION.jpg
    117.6 KB · Views: 16
  • DATASOURCE SELECTION.jpg
    DATASOURCE SELECTION.jpg
    90.3 KB · Views: 13
  • TEST CONNECTION OK.jpg
    TEST CONNECTION OK.jpg
    149.8 KB · Views: 14
  • TEST CONNECTION OK.jpg
    TEST CONNECTION OK.jpg
    149.8 KB · Views: 13
  • SELECTED DB OBJECTS.jpg
    SELECTED DB OBJECTS.jpg
    22.4 KB · Views: 14
  • SHEET2BINDINGSOURCE. IS THIS CORRECT -.jpg
    SHEET2BINDINGSOURCE. IS THIS CORRECT -.jpg
    99.9 KB · Views: 14
  • ACCESS VERSION.jpg
    ACCESS VERSION.jpg
    117.6 KB · Views: 15
Please show that you changed your build options:
From the main menu: Project.<Project Name> Properties... Switch to the Build tab:
1668479226442.png

Make sure that if you have "Any CPU" that you uncheck "Prefer 32-bit".

Or
1668479307084.png

that you are building for 64-bit.
 
Where are these dialog boxes? . The closest I could come is the snip of the Configuration Manager. The
Main Menu on my VS is also shown. cr
 

Attachments

  • CONFIGURATION MGR.jpg
    CONFIGURATION MGR.jpg
    95.4 KB · Views: 17
  • MAIN MENU.jpg
    MAIN MENU.jpg
    144.3 KB · Views: 17
Please start a new thread since your latest question has nothing to do about your database errors.
 
Back
Top Bottom