Re: Keep it alive
- From: "Georges" <georges@xxxxxxxxx>
- Date: Mon, 4 Feb 2008 18:29:43 +0100
Hi Allen!
Thanks for your answer!
It does answer my question. The only thing is that he doesn't show the code
of how it is made. Even if it's made in VB6 or any other language.
So I cannot use it because I want to open the second DB that is secured with
a password (not a workspace password) without asking the user to type it if
his Windows login is recognized.
The code below allows me to do it, but the second DB closes immediately
after that I've closed the current DB.
'===============================================
Sub OpenPasswordProtectedDB()
'Found on MS website http://support.microsoft.com/kb/235422/
Static acc As Access.application
Dim db As DAO.Database, pathDb As String
Shell "MsAccess", vbNormalFocus
Set acc = GetObject("", "Access.Application") 'Take the Access
application that has no database open
acc.Visible = True
Set db = acc.DBEngine.OpenDatabase(pathDb, False, False,
";PWD=myPassword")
acc.OpenCurrentDatabase "C:\Program Files\Microsoft
Office\Office10\Samples\Northwind.mdb"
Docmd.Quit
End Sub
'===============================================
Thanks again for any sugestion!
"Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx> a écrit dans le message de news:
Ohn3XAUZIHA.5208@xxxxxxxxxxxxxxxxxxxxxxx
Not sure if michka's TSOON application will do what you need:
TSI SOON (Shut One, Open New) database add-in
at:
http://www.trigeminal.com/lang/1033/utility.asp?ItemID=8#8
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Georges" <georges@xxxxxxxxx> wrote in message
news:47a379c9$0$21475$5402220f@xxxxxxxxxxxxxxxxxx
Hello!
Is it possible to declare an Access.Application object in a module of
another db (let's call it db1), display the application window to the
user interface and keep it alive even when db1 is closed?
Because the database object is closed as soon as the memory used by db1
is released..
Thanks for any suggestion!
.
- References:
- Keep it alive
- From: Georges
- Re: Keep it alive
- From: Allen Browne
- Keep it alive
- Prev by Date: Re: Form class module for non-existent form - how remove?
- Next by Date: Re: Check for Existing Else go to New
- Previous by thread: Re: Keep it alive
- Next by thread: Disabling a Macro from If Statement
- Index(es):
Relevant Pages
|