Solved

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

Posted on 2011-03-17
7
292 Views
Last Modified: 2012-05-11
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"

0
Comment
Question by:nkraemer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 35165285

  Interesting and I had never thought of that before.

  Short answer is I don't think you can.  User level (workgroup) security is built-in and there is no real control over the login process.

  As a work around, your going to need to use some type of a launcher app, which could handle the login dialog and then using a command line with the /user and /pwd switches to pass the username and password in.

  This will by-pass the Access built-in dialog.

  One such launcher program is Tony's Auto Updater:

http://autofeupdater.com/
 

  However it is no longer free.  You also could write your own in VB/VB.net or some other language.  Would be simple enough.

JimD.
0
 
LVL 75
ID: 35166870
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
0
 
LVL 1

Author Comment

by:nkraemer
ID: 35168095
Any settings that allow Access to close once the current DB is closed? Even if a MDW security file isn't used?  
0
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
LVL 57
ID: 35168545
<<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.
0
 
LVL 28

Expert Comment

by:burrcm
ID: 35174437
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
0
 
LVL 1

Author Comment

by:nkraemer
ID: 35315873
I ended up using the /user /pwd switch to launch via a batch command.
0
 
LVL 1

Author Closing Comment

by:nkraemer
ID: 35315906
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
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question