?
Solved

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

Posted on 2011-03-17
7
Medium Priority
?
294 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
Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

 
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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Suggested Courses

771 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