Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA 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 8th, 2008, 12:43 PM
Registered User
 
Join Date: Aug 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default User Name

I'm trying to get the user name to automatically pop into a field called Rep Name and I have the field as required. What I am trying to do is get the network user name that they login to windows with to automatically pop in this field. I have multiple users and i need it to be saved for a report that i generate. Any help with this would be very helpful thanks :D

JustinC
 
Old August 11th, 2008, 11:08 AM
Registered User
 
Join Date: Aug 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

To get the username you use the Environ function

for example

Me.RepName = Environ("USERNAME")

there's other information you can get too like computername, etc.

 
Old August 11th, 2008, 04:41 PM
Registered User
 
Join Date: Aug 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ok i just got that to work. but now its not saving the Rep Name. i need this to identify the Rep that took this information for a report.

JustinC
 
Old August 13th, 2008, 07:43 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

What do you mean that "it is not saving the rep name?"


mmcdonal

Look it up at: http://wrox.books24x7.com
 
Old August 14th, 2008, 09:38 AM
Registered User
 
Join Date: Aug 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

when i go to run the report it does not show the rep's name in the rep field of the report its blank, however it does show the rep name in the rep name in the form. Any help with this???? thanks again to all who have helped.

JustinC
 
Old August 22nd, 2008, 06:58 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Make sure the rep control in the report is bound to the same field from the same table/query that the form is.

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old September 5th, 2008, 04:55 PM
Registered User
 
Join Date: Aug 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ok i now have all of that taken care of, now i'm having another a problem. someone has taken all of the tool bars off of the database from the startup menu. now i cant get to the different views or menus. i have tried the short cut keys and they don not work so that option must be disabled as well. Please HELP!! any help with this would be great.

JustinC





Similar Threads
Thread Thread Starter Forum Replies Last Post
Session ID swapping from user to user... greenwar VS.NET 2002/2003 3 September 7th, 2007 08:44 AM
User controls' content: Chapter 2 User Controls AGS BOOK: Professional ASP.NET 2.0 Server Control and Component Development ISBN: 978-0-471-79350-2 10 July 26th, 2007 05:36 AM
login failed for user domain\user babakwx SQL Server 2000 2 May 30th, 2006 12:28 PM
Add Windows User control in Web User Control agarwalvidhu C# 0 March 30th, 2006 01:17 AM
Run DTS with a windows user, not a SQL user Kalli SQL Server DTS 1 September 15th, 2005 11:53 PM





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