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.m db" /WRKGRP "\\server\db\Service.mdw"
The shortcut launches the front end DB via this command "
MSACCESS.EXE "%userprofile%\Mars\MARS.m
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
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
Chris B
ASKER
I ended up using the /user /pwd switch to launch via a batch command.
ASKER
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
mx