LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems controlling Microsoft Access with ActiveX

Solved!
Go to solution

I have done quite a bit of searching on this topic, and have found several answers that are close, but do not address my actual problem.

 

I would like to use ActiveX to control Microsoft Access, specifically to create new database files without having to copy a blank file I have stored somewhere. I also can't stand it when I can't get something to work, so this is now a personal thing too.

 

Anyway, when I run a simple VI to open the creatable reference Access._Application, I get the error: "Error 3005 occurred at Automation Open: Object specified is not creatable in Access.vi". I have tried a lot of the common answers to this problem, like browsing for the library in the ActiveX window, and trying to register it with regsvr32, but the file is msacc.olb, which cannot be registered with regsvr32.exe. I have attached the original VI and I have tried this on 3 different PCs, all with slightly different installs of Office, but all with Access 2007. If anyone can help me figure this out, I would greatly appreciate it.

 

Thanks 

Eric
--
"When I see an adult on a bicycle, I do not despair for the future of the human race."
-H.G. Wells
0 Kudos
Message 1 of 4
(3,253 Views)

Hi xcEric,

 

Have you looked at this article?

0 Kudos
Message 2 of 4
(3,224 Views)
Solution
Accepted by xcEric

Your vi gave the same error on my machine.  Then I deleted the Access._Application reference, right-clicked on the reference input and selected Create Control.  Then I changed the Active-X Class by browsing to my computers version of the reference ("Access._Application.12").  The same vi ran without error.

 

The class still shows as Access._Application, which indicates that there may be an incompatibility which is not visible.  

 

When and activeX node fails to run when copied from any other machine, it is recommended to Replace each node that generates the error and reselect the properties and methods.

Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.0, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
Message 3 of 4
(3,211 Views)

Michael,

 

Thanks, but I've already tried that. I recreated this VI on each of my machines by building from scratch. I did not copy from one to another. Strangely enough, I tried it again, just for kicks, and of course it works now. Not sure what the problem is, but I will try again on the other machines.

Message Edited by xcEric on 08-02-2009 10:51 PM
Eric
--
"When I see an adult on a bicycle, I do not despair for the future of the human race."
-H.G. Wells
0 Kudos
Message 4 of 4
(3,174 Views)