[AccessD] an ACCESS query

Paul Hartland paul.hartland at googlemail.com
Tue Mar 12 11:41:53 CDT 2019


John,

I always use a similar method to the one here.....

https://stackoverflow.com/questions/168659/how-can-i-get-the-currently-logged-in-windows-user-in-access-vba/168682

Paul

On Tue, 12 Mar 2019 at 16:36, John W. Clark <John.Clark at niagaracounty.com>
wrote:

> I haven't been out here in quite a while, but I'm hoping someone can save
> me. I seem to have forgotten some things and I need to grab a user's Active
> Directory login ID and put it in a record.
>
> I actually haven't programmed anything in quite a while. I've been playing
> with VoIP phones and email lately and haven't needed to work with MS Access
> in a very long time. I still lurk every now and then and read the posts,
> but I haven't needed to use it.
>
> I'm praying someone has some code I can use to do this quick.  I was
> trying to use a couple of things, like:
>
>
> Dim strUser as String
> strUser = ActiveDirectory.User()
> MsgBox "Welcome back, " & strUser
>
> but I get nothing...no errors, just nothing. I've tried variations and
> some other code I've found as well.
>
> Is the "ActiveDirectory" code above native or should I be invoking
> something to make it work?
>
>
> Notice: This electronic transmission is intended for the sole use of the
> individual or entity to which it is addressed and may contain confidential,
> privileged or otherwise legally protected information. If you are not the
> intended recipient, or if you believe you are not the intended recipient,
> you are hereby notified that any use, disclosure, copying, distribution, or
> the taking of any action in reliance on the contents of this information,
> is strictly prohibited. Niagara County is not responsible for the content
> of any external hyperlink referenced in this email or any email. IF YOU
> HAVE RECEIVED THIS TRANSMISSION IN ERROR, PLEASE NOTIFY THE SENDER
> IMMEDIATELY BY EMAIL AND DELETE THE ORIGINAL MESSAGE ALONG WITH ANY PAPER
> OR ELECTRONIC COPIES. Thank you for your cooperation.
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


-- 
Paul Hartland
paul.hartland at googlemail.com


More information about the AccessD mailing list