Capture NT username

  • Thread starter Thread starter AndrewB
  • Start date Start date
A

AndrewB

There is a post & answers: Subject: Capture NT username for form * 6/2/2005
8:25 AM PST
....That asks exactly what I need:
In my Access Database I would like to pull the NT Username and store the
username (their network login name) in a field on the record the user is
entering or modifying. Unfortunately, I do not know VB at all. I can get as
far as copying the VB to a new module in Access but I do not know how to call
up the VB in a text box, table, or form and make it work for me. I really
need step by step instructions – But who has time for that??? Any specific
instructions that could be passed my way would be GREATLY appreciated.

Thanks so much,
 
On Wed, 17 Dec 2008 11:43:02 -0800, AndrewB <[email protected]>
wrote:

Indeed, nobody does. We're looking for you to meet us (at least) half
way, and put some effort into climbing the VBA knowledge curve. Show
some effort and we offer encouraging suggestions. Ask for a silver
platter and we show you the "hire a competent developer" isle.
A brief article about how to get the username is here:
http://www.mvps.org/access/api/api0008.htm

-Tom.
Microsoft Access MVP
 
Call a custom function as you would any other function. For instance, you
can use, say, the click event of a command button to add the current date to
a date field using the Date function:

Me.DateField = Date

Similarly, you can call the custom function described in the link:
Me.NT_Name = fOSUserName

As for learning about VBA, there are some online references. Check the
Access Basics tutorial at this link:
http://allenbrowne.com/tips.html
In particular, Section 2 of the tutorial discusses modules and introduces
VBA code, but there's lots of good stuff in the rest of the tutorial. There
is also lots of stuff on that page besides the tutorial, and there is a link
to a collection of links on the right side of the page.
 
Bruce,

Thanks so much for pointing me in the right direction and for the VB
tutorial link. I really appreciate it! I think this may be what I need :-)
 
Tom,

Point taken. Not looking for someone to do all the work just steer me in
the right direction. Thanks for your help.
 
Back
Top