Group:  Microsoft Access » microsoft.public.access.security
Thread: Capture NT username

Capture NT username
AndrewB 12/17/2008 7:43:02 PM
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.
Re: Capture NT username
Tom van Stiphout <tom7744.no.spam[ at ]cox.net> 12/18/2008 3:10:55 AM
On Wed, 17 Dec 2008 11:43:02 -0800, AndrewB <drewjberry[ at ]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



[Quoted Text]
>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,
Re: Capture NT username
"BruceM" <bamoob[ at ]yawhodotcalm.not> 12/18/2008 12:30:11 PM
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" <drewjberry[ at ]hotmail.com> wrote in message
news:CB5AE162-369F-4418-9552-C4F4CF31D3AB[ at ]microsoft.com...
[Quoted Text]
> 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.

Re: Capture NT username
AndrewB 12/19/2008 10:58:15 PM
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.


"BruceM" wrote:

[Quoted Text]
> 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" <drewjberry[ at ]hotmail.com> wrote in message
> news:CB5AE162-369F-4418-9552-C4F4CF31D3AB[ at ]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.
>
>
Re: Capture NT username
AndrewB 12/19/2008 11:01:04 PM
Tom,

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


"Tom van Stiphout" wrote:

[Quoted Text]
> On Wed, 17 Dec 2008 11:43:02 -0800, AndrewB <drewjberry[ at ]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,
>

Home | Search | Terms | Imprint
Newsgroups Reader