Bobby Heid
bheid at sc.rr.com
Sun Jul 22 16:18:52 CDT 2007
Sorry for the delay in getting back to you, I'm in the middle of installing Vista on my system and do not have everything installed yet. I do not open databases that way, I use something like: Set dbDatabase = Workspaces(0).OpenDatabase(lstrEnterpriseDB, True, False, ";pwd=" & SECUREPW) Where in your case, SECUREPW would be the password that the user entered. I am sure that you could modify your version to include the ';pw=somepassword' functionality. Basically your connection string looks like this (for later versions (not sure of 2007) of Access: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\My.mdb;Password=SomePassword; Hope this helps, Bobby -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark A Matte Sent: Thursday, July 19, 2007 9:53 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Require password for linked MDB tables But if I use the following to try to link...I get the error (invalid Password): Set tdf = dbs.CreateTableDef("Test") tdf.Connect = ";Database=C:\temp\test.mdb" tdf.SourceTableName = "tblPass" dbs.TableDefs.Append tdf >From: "Bobby Heid" <bheid at sc.rr.com> >Reply-To: Access Developers discussion and problem >solving<accessd at databaseadvisors.com> >To: "'Access Developers discussion and problem >solving'"<accessd at databaseadvisors.com> >Subject: Re: [AccessD] Require password for linked MDB tables >Date: Wed, 18 Jul 2007 18:14:10 -0400 > >I guess if you asked the user for the password before linking the table, >then it might work. You would have it unlink it after using it. > >Bobby > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark A Matte >Sent: Tuesday, July 17, 2007 3:49 PM >To: accessd at databaseadvisors.com >Subject: [AccessD] Require password for linked MDB tables > >Hello All, > >Can I have an MDB linked to a seperate MDB(with password)...and have the >user required to enter just a password to view the linked table each time? > >And is it different in different versions? > >Thanks, > >Mark A. Matte >