We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Opening Access 2010 database with VB.Net 2008

transstates
transstates asked
on
Medium Priority
777 Views
Last Modified: 2012-06-27
I use this to open earlier versions of access.  Obviously doesn't work with Access 2010.  How do you open an "accde" file with vb.net?  Do you have to convert it to a .mde or .mdb first?  

Dim objAccess As Access.Application
objAccess = New Access.ApplicationClass()
objAccess.OpenCurrentDatabase("database path", False, "")

objAccess.Quit(Option:=Access.AcQuitOption.acQuitSaveNone)
System.Runtime.InteropServices.Marshal.ReleaseComObject(oAccess)
objAccess = Nothing

Any help would be great!

Thanks.

Jim
Comment
Watch Question

Dirk HaestProject manager
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Thanks for the help.

What I'm trying to do is just open and access database, "accde" file.  This db contains a list of reports to print.  So I just need to open it and then close the msaccess.exe when the user is finished.

Author

Commented:
When this access database opens, it has a startup form that will guide the user the rest of the way. I just need to open it like you would a regular .mdb.  The above code opens the startup form for previous versions of access.
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Dhaest, I only gave lower points becuase the process.start actually did what I need for the quick fix.  Your link is very helpful for doing more work with access.  

I thank you both so much for the help!!

Jim
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014

Commented:
Glad to help :-)
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.