Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Security / May 2004

Tip: Looking for answers? Try searching our database.

Open a Password-Protected Database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
fred - 19 May 2004 21:03 GMT
Testing "MS Knowledge Base Article  -  235422  -  Open
a Password-Protected Database...", I was able to open
a "protected.mdb" with a " "second.mdb" as illustrated
in the article.  My problem is, as soon as the  
"protected.mdb" is opened by the "second.mdb", I
immediately close the "second.mdb".  When I do this, I
get the "...There was a problem sending the command to
the program" error message for the "second.mdb".  Is
there a way to avoid this error message?  I want to
make the "second.mdb" 'transparent' to the user.

Below is the code for the start form for the "second.mdb":

Private Sub Form_Load()
 OpenPasswordProtectedDB  ' 235422 subroutine in module
 DoCmd.Quit
End Sub
tina - 20 May 2004 08:24 GMT
i notice you have your code in the form's Load event, which can't be
cancelled. have you tried

Private Sub Form_Open(Cancel As Integer)
   OpenPasswordProtectedDB  ' 235422 subroutine in module
   Cancel = True
   DoCmd.Quit
End Sub

hth

> Testing "MS Knowledge Base Article  -  235422  -  Open
> a Password-Protected Database...", I was able to open
[quoted text clipped - 13 lines]
>   DoCmd.Quit
> End Sub
fred - 20 May 2004 20:09 GMT
tina,

The "Cancel" line didn't work.  Where do you
think should the code be executed if you
think the Load event might be the one causing
the problem?  All I want is to execute the
subroutine from the "second.mdb" and immediately
close the "second.mdb".  The "protected.mdb" will
take over the session. Is there a more efficient
way of doing this?

>-----Original Message-----
>i notice you have your code in the form's Load event, which can't be
[quoted text clipped - 27 lines]
>
>.
tina - 20 May 2004 20:18 GMT
sorry, fred, that was the extent of my ideas. suggest if you don't get any
other responses today, that you re-post tomorrow.

> tina,
>
[quoted text clipped - 43 lines]
> >
> >.
fred - 20 May 2004 20:39 GMT
tina,

thanks...

FRED
>-----Original Message-----
>sorry, fred, that was the extent of my ideas. suggest if you don't get any
[quoted text clipped - 49 lines]
>
>.
TC - 21 May 2004 02:47 GMT
Maybe it doesn't like you quitting the database while the Open or Load
events are still running. (I don't have Access here to check.) Try moving
the Quit command to the Current event of the form. Or, move it to the Timer
event, and have Open or Load say:  Me.Timer=1000.

HTH,
TC

> tina,
>
[quoted text clipped - 43 lines]
> >
> >.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.