Wrox Programmer Forums
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 30th, 2004, 08:19 PM
Registered User
Join Date: Jul 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Obtaining User Logon

I need to auto-populate my tables/forms with the name of the user who updates them. I know how to do this by obtaining the windows logon name, but in this instance we have contractors working for us and the pcs are already logged on when they start work. I need to get each user to log into the database (i don't want any password prompts).
I haven't set up any security in the access dbase (I've played around with it once and locked myself out so I am pretty cautious with it now). I was thinking something along the lines of asking for a user name when the database opens (no passwords) then having this populate the tables/forms as they are updated. Does anyone have any suggestions (or even a better idea) for how this can be done?

Old September 2nd, 2004, 01:39 PM
Friend of Wrox
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc

How are you going to know who has made the change if you a have no security at the appplication level or any other method of identification. As troublesome as it may appear have your vendor log in as you would any other user, in the long run tracking all changes and or modifications will be more efficient. Employees are one of the highest security risk for any company. Users tend to let others use thier workstation not knowing what ill effect a vendor or outside person call do. security, security, security.
If you use no password at the access database you must clear the last logged on user, otherwise the next person just has to hit enter. ( remember you had no password)

With any Access database, Microsoft Access stores the name of the last user to have accessed the database in the Windows registry. When you implement Access Security, the name of the last user appears in the Logon dialog box whenever the database is opened.

To prevent the last user's name from appearing in the Name box of the Logon dialog box, create a shortcut that includes the /user switch, but which does not include the name of a user. For an example of how to do this, follow these steps. This example assumes that Northwind.mdb is the secured database, and it creates a shortcut based on this assumption.
Right-click the Windows desktop where you intend to open and use your secured Microsoft Access database.
Point to New, and then click Shortcut.
On the first page of the Create Shortcut Wizard, type the following command line, and then click Next:
"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb" /user

On the second page, type Northwind 2000, and then click Finish.
Double-click the new shortcut. Note that the Name box in the Logon dialog box is blank.

Similar Threads
Thread Thread Starter Forum Replies Last Post
prevent user logon and password from saving Hughesie78 ASP.NET 2.0 Basics 1 December 6th, 2007 12:20 PM
One user getting logon screen digby_dog Access 4 August 6th, 2007 12:44 PM
Logon failure: user account restriction. Possible zaghmout HTML Code Clinic 2 January 6th, 2007 10:34 AM
Checking user list logon to SQL server Jane SQL Server 2000 4 May 16th, 2006 02:35 AM
How to detect if a user is logon a Windows NT øej Pro VB.NET 2002/2003 1 January 23rd, 2004 10:30 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.