A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Adding ID field to a report in Access



 
 
Thread Tools Display Modes
  #1  
Old August 8th, 2007, 03:44 PM posted to microsoft.public.access.reports
Steve S
external usenet poster
 
Posts: 162
Default Adding ID field to a report in Access

I need to add a field to a report that will identify the person that printed
the report. What I would like to do is add a field that will display the
Windows login id or computer name or something related to the computer or
person printing the report. Any help would be greatly appreciated.
Thanks in advance for your help,
--
Steve S
  #2  
Old August 8th, 2007, 03:50 PM posted to microsoft.public.access.reports
Allen Browne
external usenet poster
 
Posts: 11,706
Default Adding ID field to a report in Access

See:
http://www.mvps.org/access/api/api0008.htm

After copying the code into a standard module, you can add a text box to
your report, and set its Control Source to:
=fOSUserName()

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Steve S" wrote in message
...
I need to add a field to a report that will identify the person that
printed
the report. What I would like to do is add a field that will display the
Windows login id or computer name or something related to the computer or
person printing the report. Any help would be greatly appreciated.
Thanks in advance for your help,
--
Steve S


  #3  
Old August 8th, 2007, 05:02 PM posted to microsoft.public.access.reports
krissco
external usenet poster
 
Posts: 167
Default Adding ID field to a report in Access

On Aug 8, 6:44 am, Steve S wrote:
I need to add a field to a report that will identify the person that printed
the report. What I would like to do is add a field that will display the
Windows login id or computer name or something related to the computer or
person printing the report. Any help would be greatly appreciated.
Thanks in advance for your help,
--
Steve S


Put a text box on your report with the following source:

=environ("username")


Please note, this uses an environment variable which is subject to
tampering (if your users are somewhat sophisticated). There is an API
call (no doubt someone will post it, or you can search for it) which
would eliminate the prospect of tampering.

-Kris

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:40 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.