Hello,
I need to run Access from VB
The following doesn't work.
Set MyObject = CreateObject("Access.application")
MyObject.Open ("P:\Rep\CPT.mdb")
Any Idea why??
Thanks in advance !!
Esperanza
Paul Overway - 30 Jul 2004 17:09 GMT
Is it a runtime version of Access? If yes, you cannot instantiate an Access
runtime. If your only objective is to open the file, use Shell instead.

Signature
Paul Overway
Logico Solutions, LLC
www.logico-solutions.com
> Hello,
> I need to run Access from VB
[quoted text clipped - 6 lines]
> Thanks in advance !!
> Esperanza
Tim Baur - 30 Jul 2004 17:09 GMT
"Esperanza" <esperanza222@hotmail.com> wrote in news:e33bv3kdEHA.216
@TK2MSFTNGP11.phx.gbl:
> Set MyObject = CreateObject("Access.application")
> MyObject.Open ("P:\Rep\CPT.mdb")
Make sure you:
Hve a reference to the Microsoft Access Object XX.X Library
Declare MyObject as AccessObject
Have access to "P\Rep\"
Have access to "CPT.mdb"
Private Sub TryThis()
Dim MyObject As Access.Application
Set MyObject = CreateObject("Access.application")
MyObject.OpenCurrentDatabase ("P:\Rep\CPT.mdb")
MyObject.Visible = True
End Sub