GetObject or CreateObject with Access 2000/2002

L

Linda

Am new to vb.net and I am trying to late bind an Access object library and open an Access application (for use with different versions of Access Object Libraries). I've tried the standard GetObject and CreateObject syntax with various ways to reference MS Access as the application, with no luck. The message I get is "Cannot create ActiveX component". Any help would be appreciated.
 
E

Eric Lawrence [MSFT]

What string are you passing to CreateObject?

--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.

Linda said:
Am new to vb.net and I am trying to late bind an Access object library and
open an Access application (for use with different versions of Access Object
Libraries). I've tried the standard GetObject and CreateObject syntax with
various ways to reference MS Access as the application, with no luck. The
message I get is "Cannot create ActiveX component". Any help would be
appreciated.
 
L

Linda

Eric, I've tried the following without success:

CreateObject("MSAccess")
CreateObject("MSAccess.Application")
CreateObject("Access")
CreateObject("Access.Application")
CreateObject("MSACC")
CreateObject("MSACC.Application")
CreateObject("Access.Application.10") (version of Access is 2002)
CreateObject("MSAccess.Application.10")

I don't really want to reference the version, as the whole reason for late binding is to pick up whatever version is running, to get around an Object Library reference problem I have.

Thanks for your help.
 
E

Eric Lawrence [MSFT]

"Access.Application" should work. Can you share more of your code? What
version of Access is installed on the machine you're coding on?

--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.

Linda said:
Eric, I've tried the following without success:

CreateObject("MSAccess")
CreateObject("MSAccess.Application")
CreateObject("Access")
CreateObject("Access.Application")
CreateObject("MSACC")
CreateObject("MSACC.Application")
CreateObject("Access.Application.10") (version of Access is 2002)
CreateObject("MSAccess.Application.10")

I don't really want to reference the version, as the whole reason for late
binding is to pick up whatever version is running, to get around an Object
Library reference problem I have.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top