DJK(John) Robinson
djkr at msn.com
Tue May 31 15:29:16 CDT 2005
Solved! (Thank you, ADH) The 2nd and 3rd parameters of OpenDatabase must both be explicitly supplied, so: Set db = OpenDatabase("whatever.mdb", False, False, ";pwd=secret;") Actually, *any* combination of True and False will do, as will 0 and 1. Bizarrely, the values are irrelevant: but they must be supplied! (These are the Options and ReadOnly parameters.) John > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > DJK(John) Robinson > Sent: 31 May 2005 20:30 > To: 'Access Developers discussion and problem solving' > Subject: [AccessD] A97: How to OpenDatabase an mdb with a password? > > > I am analyzing and documenting a bunch of interlinked Access > 97 databases left behind by someone else. Many have > passwords, and I know what they are. They need to be left ON, > if possible. > > I'm writing VBA in my own database to open each of the other > databases in turn, to get some design information from them. > However, I am having difficulty getting the OpenDatabase > command right in the case of the databases with passwords. > Whatever I try, I get RTE 3031: Not a valid password. > > Does anybody know the magic formula, please? > > John > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >