By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,253 Members | 1,676 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,253 IT Pros & Developers. It's quick & easy.

Is it possible to "remember" log in credentials? (Many MDB's sharing one MDW)

P: n/a
Maybe I'm missing something obvious, but if I several MDB's that use
the same secure workgroup MDW file and the user logs into one of them
is there a way through code that I can open other databases using
his/her credentials that were validated when the first database was
opened? (I want to open a new physical instance of Access, not a
ADOX connection or DAO workspace. Basically trying to avoid making
them put in their User Name and Password more than once.)

I've noticed that I can simulate the shortcut by using the shell
command and send the user name in the command line parameter, but I
don't know of any way to send their password so they still get
prompted for that...

Thanks in advance...

Mike
Nov 13 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
"Mike Von Stein" <mv*******@yahoo.com> wrote in message
news:c9**************************@posting.google.c om...
Maybe I'm missing something obvious, but if I several MDB's that use
the same secure workgroup MDW file and the user logs into one of them
is there a way through code that I can open other databases using
his/her credentials that were validated when the first database was
opened? (I want to open a new physical instance of Access, not a
ADOX connection or DAO workspace. Basically trying to avoid making
them put in their User Name and Password more than once.)

I've noticed that I can simulate the shortcut by using the shell
command and send the user name in the command line parameter, but I
don't know of any way to send their password so they still get
prompted for that...


If the password were easily retrievable from code what good would it be?

Once in your primary application you could prompt them for it again with
your own form and store it as a variable. Then at least you would not need
to have them enter it more than twice. Once to get in initially and then
again where you can save it.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2

P: n/a
On 15 Jun 2004 23:40:44 -0700, mv*******@yahoo.com (Mike Von Stein)
wrote:

Look up the Access command line parameters in the help file. In
addition to /user, you will also find /pwd.

-Tom.
Maybe I'm missing something obvious, but if I several MDB's that use
the same secure workgroup MDW file and the user logs into one of them
is there a way through code that I can open other databases using
his/her credentials that were validated when the first database was
opened? (I want to open a new physical instance of Access, not a
ADOX connection or DAO workspace. Basically trying to avoid making
them put in their User Name and Password more than once.)

I've noticed that I can simulate the shortcut by using the shell
command and send the user name in the command line parameter, but I
don't know of any way to send their password so they still get
prompted for that...

Thanks in advance...

Mike


Nov 13 '05 #3

P: n/a
mv*******@yahoo.com (Mike Von Stein) wrote in message news:<c9**************************@posting.google. com>...
Maybe I'm missing something obvious, but if I several MDB's that use
the same secure workgroup MDW file and the user logs into one of them
is there a way through code that I can open other databases using
his/her credentials that were validated when the first database was
opened? (I want to open a new physical instance of Access, not a
ADOX connection or DAO workspace. Basically trying to avoid making
them put in their User Name and Password more than once.)

I've noticed that I can simulate the shortcut by using the shell
command and send the user name in the command line parameter, but I
don't know of any way to send their password so they still get
prompted for that...


While there is a way to retrieve the user id there's no way to
retrieve the password entered at the Access logon screen. What you
could do to save the login is to make a separate unsecured 'starter'
application that does nothing but collect the user id and password
from the user in a logon screen of your own design, caches those
values in a variable, and then starts your primary application using
the stored logon information. This could all be transparent to the
user since the logon information would only need to be entered once.
You could extend this 'starter' application to be a menu of available
applications. When a user clicks on a menu item to start a particular
application the starter app simply tries to start the selected app
using the cached logon information.

Bruce
Nov 13 '05 #4

P: n/a
mv*******@yahoo.com (Mike Von Stein) wrote in message news:<c9**************************@posting.google. com>...
Maybe I'm missing something obvious, but if I several MDB's that use
the same secure workgroup MDW file and the user logs into one of them
is there a way through code that I can open other databases using
his/her credentials that were validated when the first database was
opened? (I want to open a new physical instance of Access, not a
ADOX connection or DAO workspace. Basically trying to avoid making
them put in their User Name and Password more than once.)

I've noticed that I can simulate the shortcut by using the shell
command and send the user name in the command line parameter, but I
don't know of any way to send their password so they still get
prompted for that...

Thanks in advance...

Mike


kind of a hack but I have a procedure that you pass the path of the
new database you want to open, shell out to the new database, and then
close the current database

Private Sub OpenProgram(strProgram As String)
On Error GoTo error_handler

Dim strUser As String
Dim strPathToAccess As String

'get the path to access exe

strPathToAccess = SysCmd(acSysCmdAccessDir) & "MSACCESS.exe "

'grab the current user
strUser = Application.CurrentUser

'and test if auditor or tca
Shell (strPathToAccess & strProgram _
& "/wrkgrp " & """C:\Path\workgroup.mdw""" & "
/user " & strUser & " /pwd password"), vbMaximizedFocus
Application.Quit

Exit Sub

error_handler:
MsgBox Err.Description
Exit Sub

End Sub
Nov 13 '05 #5

P: n/a
"Dan Morgan" <us****@yahoo.com> wrote in message
news:fe**************************@posting.google.c om...
mv*******@yahoo.com (Mike Von Stein) wrote in message news:<c9**************************@posting.google. com>...
kind of a hack but I have a procedure that you pass the path of the
new database you want to open, shell out to the new database, and then
close the current database

Private Sub OpenProgram(strProgram As String)
On Error GoTo error_handler

Dim strUser As String
Dim strPathToAccess As String

'get the path to access exe

strPathToAccess = SysCmd(acSysCmdAccessDir) & "MSACCESS.exe "

'grab the current user
strUser = Application.CurrentUser

'and test if auditor or tca
Shell (strPathToAccess & strProgram _
& "/wrkgrp " & """C:\Path\workgroup.mdw""" & "
/user " & strUser & " /pwd password"), vbMaximizedFocus
Application.Quit

Exit Sub

error_handler:
MsgBox Err.Description
Exit Sub

End Sub


But how do you know the password to pass?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

Nov 13 '05 #6

P: n/a
mv*******@yahoo.com (Mike Von Stein) wrote in message news:<c9**************************@posting.google. com>...
Maybe I'm missing something obvious, but if I several MDB's that use
the same secure workgroup MDW file and the user logs into one of them
is there a way through code that I can open other databases using
his/her credentials that were validated when the first database was
opened? (I want to open a new physical instance of Access, not a
ADOX connection or DAO workspace. Basically trying to avoid making
them put in their User Name and Password more than once.)

I've noticed that I can simulate the shortcut by using the shell
command and send the user name in the command line parameter, but I
don't know of any way to send their password so they still get
prompted for that...

Thanks in advance...

Mike


kind of a hack but I have a procedure that you pass the path of the
new database you want to open, shell out to the new database, and then
close the current database

Private Sub OpenProgram(strProgram As String)
On Error GoTo error_handler

Dim strUser As String
Dim strPathToAccess As String

'get the path to access exe

strPathToAccess = SysCmd(acSysCmdAccessDir) & "MSACCESS.exe "

'grab the current user
strUser = Application.CurrentUser

'and test if auditor or tca
Shell (strPathToAccess & strProgram _
& "/wrkgrp " & """C:\Path\workgroup.mdw""" & "
/user " & strUser & " /pwd password"), vbMaximizedFocus
Application.Quit

Exit Sub

error_handler:
MsgBox Err.Description
Exit Sub

End Sub
Nov 13 '05 #7

P: n/a
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message news:<io******************@news04.bloor.is.net.cab le.rogers.com>...
"Dan Morgan" <us****@yahoo.com> wrote in message
news:fe**************************@posting.google.c om...
mv*******@yahoo.com (Mike Von Stein) wrote in message

news:<c9**************************@posting.google. com>...

kind of a hack but I have a procedure that you pass the path of the
new database you want to open, shell out to the new database, and then
close the current database

Private Sub OpenProgram(strProgram As String)
On Error GoTo error_handler

Dim strUser As String
Dim strPathToAccess As String

'get the path to access exe

strPathToAccess = SysCmd(acSysCmdAccessDir) & "MSACCESS.exe "

'grab the current user
strUser = Application.CurrentUser

'and test if auditor or tca
Shell (strPathToAccess & strProgram _
& "/wrkgrp " & """C:\Path\workgroup.mdw""" & "
/user " & strUser & " /pwd password"), vbMaximizedFocus
Application.Quit

Exit Sub

error_handler:
MsgBox Err.Description
Exit Sub

End Sub


But how do you know the password to pass?


I have two workgroup files. Once the user has authenticated as a user
with a password against one workgroup file, I log them into the next
instance of access as the same user using the second workgroup file
and a hidden password. The group and user structure is the same in
both mdw's. One downside is they can't change their password once
they have moved from one database to another.
Nov 13 '05 #8

P: n/a
Security bug in A97 allows you to do this under special circumstances.
Otherwise.... the command line parameter for password is /pwd

(david)
"Mike Von Stein" <mv*******@yahoo.com> wrote in message
news:c9**************************@posting.google.c om...
Maybe I'm missing something obvious, but if I several MDB's that use
the same secure workgroup MDW file and the user logs into one of them
is there a way through code that I can open other databases using
his/her credentials that were validated when the first database was
opened? (I want to open a new physical instance of Access, not a
ADOX connection or DAO workspace. Basically trying to avoid making
them put in their User Name and Password more than once.)

I've noticed that I can simulate the shortcut by using the shell
command and send the user name in the command line parameter, but I
don't know of any way to send their password so they still get
prompted for that...

Thanks in advance...

Mike

Nov 13 '05 #9

P: n/a
Thanks for the input. I guess I was hoping for "integrated" security
once the user was authenticated which just doesn't exist so I'll have
to try the options mentioned.

Mike
Nov 13 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.