Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General / July 2004



Tip: Looking for answers? Try searching our database.

Run Access from VB

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Esperanza - 30 Jul 2004 16:57 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.