[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 592
  • Last Modified:

Shell execute API vb.net Launch a program

Does an anyone know if it is possible to run an Access database without specifying the location of MCAccess.exe if so what is the syntax?

(My users have MSAccess.exe in various places) I thought of putting the location of the exe in a text file on the client but this is a bit clumsy.
0
HKFuey
Asked:
HKFuey
  • 2
2 Solutions
 
CompProbSolvCommented:
This should point you in the right direction:
http://support.microsoft.com/kb/317113

(From that link):
Dim oAccess As Access.Application

' Start a new instance of Access for Automation:
oAccess = New Access.ApplicationClass()

' Open a database in exclusive mode:
oAccess.OpenCurrentDatabase(filepath:="c:\mydb.mdb", Exclusive:=True)
0
 
käµfm³d 👽Commented:
If the user has the corresponding Access database files registered to open with Access (by default they would), then you can simply specify the database filename to Process.Start. If the user has changed the default application for such files, then they will opened using that program.

e.g.

System.Diagnostics.Process.Start("C:\path\to\database\file.accdb")

Open in new window

0
 
HKFueyAuthor Commented:
Thanks, will try after the weekend! ; )
0
 
HKFueyAuthor Commented:
Works great, thanks!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now