Home All Groups Group Topic Archive Search About

Capture NT username

Author
17 Dec 2008 7:43 PM
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,

--
AndrewB.

Author
18 Dec 2008 3:10 AM
Tom van Stiphout
On Wed, 17 Dec 2008 11:43:02 -0800, AndrewB <drewjbe***@hotmail.com>
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



Show quoteHide quote
>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,
Author
19 Dec 2008 11:01 PM
AndrewB
Tom,

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


Show quoteHide quote
"Tom van Stiphout" wrote:

> On Wed, 17 Dec 2008 11:43:02 -0800, AndrewB <drewjbe***@hotmail.com>
> 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
>
>
>
> >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,
>
Author
18 Dec 2008 12:30 PM
BruceM
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.

Show quoteHide quote
"AndrewB" <drewjbe***@hotmail.com> wrote in message
news:CB5AE162-369F-4418-9552-C4F4CF31D3AB@microsoft.com...
> 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,
>
> --
> AndrewB.
Author
19 Dec 2008 10:58 PM
AndrewB
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 :-)
--
AndrewB.


Show quoteHide quote
"BruceM" wrote:

> 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.
>
> "AndrewB" <drewjbe***@hotmail.com> wrote in message
> news:CB5AE162-369F-4418-9552-C4F4CF31D3AB@microsoft.com...
> > 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,
> >
> > --
> > AndrewB.
>
>