Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2011-03-17
7
Medium Priority
?
296 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 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 1500 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
Industry Leaders: 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!

 
LVL 58
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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

596 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