Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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 October 16th, 2005, 10:02 AM
Authorized User
 
Join Date: Oct 2005
Location: South Ockendon, Essex, United Kingdom.
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Figgis
Default Recording User ID's

Hi,

I am currently putting together a claims database and I want to record the user ID for people making changes or raising new claims. The version of Access is '97 and it is used on a version of Windows NT. The computers are networked and I do not have admin rights to them. I don't want to set up a log in system unless I absolutely have to. I would prefer to pick up the users ID from the machine they are logged into as there are going to be several departments using the database and many different users within each department. I will be limiting access by distributing different front ends to different departments. Can somebody help me with this. I have searched the net for a possible solution but can find nothing that will tell me where the user name is stored or how to access it.
 
Old October 17th, 2005, 08:27 AM
Friend of Wrox
 
Join Date: Oct 2004
Location: Clinton, UT, USA.
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

I haven't tried this in Access, but I had a similar project in Excel a few months ago and this worked for that...

TextBox2 = Environ("USERNAME")

Hope that helps,

Mike

Mike
EchoVue.com
 
Old October 17th, 2005, 11:12 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Yeah, it's a good idea to use environment variables to capture the identity of people making changes. I use these default values in tables where users will be creating new records, then I just don't show the fields and they are updated with the default values.

sUser = Environ("UserName")
sComp = Environ("ComputerName")
dTime = Now()

HTH



mmcdonal
 
Old October 17th, 2005, 01:18 PM
Authorized User
 
Join Date: Oct 2005
Location: South Ockendon, Essex, United Kingdom.
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Figgis
Default

Thanks that worked well and saved me a lot of agro




Similar Threads
Thread Thread Starter Forum Replies Last Post
Overlapping id's problem Gert SQL Server 2005 4 May 26th, 2006 03:55 AM
Underscores in ID's?????? matallen XSLT 0 March 6th, 2006 02:04 PM
Doing addition on Unique Id's ravik@olemiss.edu XSLT 1 August 1st, 2005 02:45 PM
recording user click throughs malk Classic ASP Basics 0 March 16th, 2005 08:13 AM
Chapter 12 div id's buzzuh BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 September 3rd, 2004 08:47 AM





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