Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open access mdb file with password

Status
Not open for further replies.

mpires

Programmer
Aug 24, 2004
1
PT
Hi

all, I'm digging for two days one way to execute access like we double click the mdb icon, but what i really need is to do this using vb.net. Hi have try to open the mdb as process / cmd / shell... and i'm able to open the file but i can't set the pwd. The mdb file as pwd to get open and the only way i have found was open mdb as vb.net object, but this way i have a problem because access will depend from vb.net and if we close vb.net app then access will close as well. My code:


Dim oAccess As Access.Application

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

' Open a database in share mode:

oAccess.OpenCurrentDatabase(filepath:="c:\x1.mdb", _
Exclusive:=False, bstrPassword:="xpto")

'Show Access aplication
oAccess.Visible = True

I need to execute access because i have made a login that interact with domain AD, and do another things before users can open the files.

Any idea to accomplish this is welcome

Regards,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top