Rocky Smolin - Beach Access Software
bchacc at san.rr.com
Mon Jul 17 08:27:42 CDT 2006
Yeah, thanks - got a couple of good solutions. Rocky Bobby Heid wrote: > Rocky, > > I left early on Friday, so sorry for the no reply. It looked like some > others answered the issue below. Did you get it going? > > Bobby > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin - > Beach Access Software > Sent: Friday, July 14, 2006 2:02 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] [SPAM SUSPECT] Opening password protected database > > > Bobby: > > I tried using set db = Currentdb after putting the password on the back > end and got an 'invalid password' error when opening the first recordset > to a linked table. > > Rocky > > > > > Bobby Heid wrote: > >> Did not read all of the email. >> >> If the tables in the BE are linked, then you can use CurrentDB. You only >> have to use the Opendatabse method if you are opening the BE directly. >> >> Now, you will have to use the password when linking the tables. >> >> Bobby >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin - >> Beach Access Software >> Sent: Friday, July 14, 2006 12:44 PM >> To: Access Developers discussion and problem solving >> Subject: [SPAM SUSPECT] [AccessD] Opening password protected database >> Importance: Low >> >> >> Dear List: >> >> I am trying to open a password protected database using the following: >> >> Set db = CurrentDb >> MsgBox db.Name >> Dim strPWD As String >> strPWD = "shannon" >> Dim strDB As String >> strDB = Left(db.Name, Len(db.Name) - 6) & "BE.mdb" >> Set db = DBEngine.OpenDatabase(strDB, False, False, "pwd=" & strPWD) >> >> >> Set db = DBEngine.OpenDatabase(db.Name, False, False, "pwd=" & strPWD) >> >> I used Set db = CurrentDb just to be sure I was getting the exact path >> and file name of the back end and strDB does indeed have the correct >> path and filename of the back end. The password is also correct. >> >> What am I doing wrong? >> >> Maybe there's a simpler way? The client wants to have the back end >> password protected, so instead of using the simple set db=Currentdb >> everywhere in the app I guess I have to use some syntax which specifies >> the password. All the tables in the back end are linked. >> >> MTIA >> >> Rocky >> >> >> > > -- Rocky Smolin Beach Access Software 858-259-4334 www.e-z-mrp.com