Link to home
Start Free TrialLog in
Avatar of nkraemer
nkraemer

asked on

Close MS Access 2007 program after cancelling the login prompt of a mdw protected database

my front end Access 2007 database is secured with an MDW file (via a shortcut, see below). If a user launches the database, they are prompted for a logon (as expected). However, if they cancel the logon screen, the database closes, but MS Access stays open. How do I make it so MS Access quits if they cancel the logon?


The shortcut launches the front end DB via this command " 
MSACCESS.EXE "%userprofile%\Mars\MARS.mdb" /WRKGRP "\\server\db\Service.mdw"

ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Tony gave a demo at the Summit.  It's pretty cool, lots of new functionality.  I can see why it's no longer free.

mx
Avatar of nkraemer
nkraemer

ASKER

Any settings that allow Access to close once the current DB is closed? Even if a MDW security file isn't used?  
<<Any settings that allow Access to close once the current DB is closed? Even if a MDW security file isn't used?  >>

  No, but you can issue an application.quit in a macro or code, which shuts Access down.  But since you have not gotten that far at the point of the login, you can't even do that.

JimD.
And in A2010/accdb, no more user level security, so might be time to find another method, i.e. write your own login process in Access. If you do this you will be able to exit on incorrect login. I am currently in the middle of such a project (and will definitely keep this question in mind, as it will be a nice touch), but it will be a few weeks before I am done.

Chris B
I ended up using the /user /pwd switch to launch via a batch command.
The answer didn't fit my need completely, but only because Microsoft doesn't offer a solution. This answer helped me find a way to the solution