how to open an mdb file has a database password form another mdb

R

Ramiab

I have the data in an mdb file secured.
I wrote this to link to that mdb file

Set Dbnd = DBEngine.Workspaces(0).OpenDatabase("c:\DataFiles\acc2007.mdb",
False, False)

the error message "not a valid password"

how to set dbengine with password
 
D

Daniel Pineault

If you check the help file for 'OpenDatabase Method' you see in the input
variables 'connect' which description is

"Optional. A Variant (String subtype) that specifies various connection
information, including passwords. "

so try adding the 4th input variable and you should be good to go.
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top