Is it possible to skip the login prompt that access shows when opening
a db with a workgroup file?
I want to use user level security, but I dont want the user to
manually logon, when they started the access app, I compare their
access user name with their windows logon user name, if not the same,
they are kicked.
Ive tested to start my app with
access.exe my.mdb /wrkgrp my.mdw AND /user %USERNAME%
Still I get the prompt to log in, but the right name is there.
It doesnt matter if I add the password arg.
Albert D. Kallal - 20 Nov 2003 22:07 GMT
You short cut has to be hard coded.
you can use:
"C:\Program Files\Microsoft Office\Office\msaccess.exe"
"c:\program files\Rides\Rides.mdb"
/wrkgrp "c:\Program Files\Rides\Rides.mdw"
/User "RidesAdmin"
/pwd "thePasswod"
The above short cut is broken on where a SPACE would be between each line
So, when you make your actual short cut, you would put all of the above into
the "target" of the shortcut you make.
Also, of couse it is a VERY good idea to speicify the workgroup file in use.
You can get the current network logon name with:
http://www.mvps.org/access/api/api0008.htm
And, the current computer name with:
http://www.mvps.org/access/api/api0009.htm
And, if using ms-access security, then currentuser() will return the
ms-access logon.
I often log all 3 of the above values in some applications.
--
Albert D. Kallal (MVP)
Edmonton, Alberta Canada
NoooSPAmkallal@msn.com
http://www.attcanada.net/~kallal.msn
> Is it possible to skip the login prompt that access shows when opening
> a db with a workgroup file?
[quoted text clipped - 8 lines]
> Still I get the prompt to log in, but the right name is there.
> It doesnt matter if I add the password arg.
david epsom dot com dot au - 22 Nov 2003 05:13 GMT
> Still I get the prompt to log in, but the right name is there.
> It doesnt matter if I add the password arg.
If the name and password are accepted, there is no login prompt.
If you get a prompt, it means the name and password were
not accepted: because they are wrong, or because the workgroup
was not found, or because there was an error in your shortcut.
>/user %USERNAME%
I use that where I want login ID for the Record Locking messages,
but no password is required. But it means that the users must
be in the workgroup file.
If all I want is login ID for internal use in the application,
I use an API call to get an ID, and don't have to put the users
into the Access workgroup.
(david)
> Is it possible to skip the login prompt that access shows when opening
> a db with a workgroup file?
[quoted text clipped - 8 lines]
> Still I get the prompt to log in, but the right name is there.
> It doesnt matter if I add the password arg.