Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert user name to actual name? 1

Status
Not open for further replies.

bdmangum

Technical User
Dec 6, 2006
171
US
Howdy!

I have a database which I am currently building. The people I'm building it for would like to see who uses the database. Thus I inserted a tracking method for each entry. I currently track the user by using the Environ("USERNAME") command. The people I'm building this for would like the username converted to the actual person's name. Similar to the way Outlook converts the username to the name when sending an email.

I have no idea how to accomplish this request. Is this possible? If so, what commands are used?

TIA

BD
 




Hi,

Maybe you have an Employee Table, containing UID and NAME?

Skip,

[glasses] To be safe on the [red]FOURTH[/red],
Don't take a [red]FIFTH[/red] on the [red]THIRD[/red]
Or you might not come [red]FORTH[/red] on the [red]FIFTH[/red]
[red][highlight blue]FORTH[/highlight][/red][white][highlight red]WITH[/highlight][/white] [tongue]
 
I thought about that. The problem is if new users begin using the database they won't be in the table I made during development. The people whom I'm building will not like having to go update the table anytime someone new uses the system.

My company uses a Windows network where everyone is assigned a seven letter unique userID. Other Office programs such as Outlook can somehow translate the userID into the person's name. I'm not sure how this is accomplished. Is Outlook connecting to a network database with the names? If so, is there an easy way to access this?
 




Your the developer. Find out.

Skip,

[glasses] To be safe on the [red]FOURTH[/red],
Don't take a [red]FIFTH[/red] on the [red]THIRD[/red]
Or you might not come [red]FORTH[/red] on the [red]FIFTH[/red]
[red][highlight blue]FORTH[/highlight][/red][white][highlight red]WITH[/highlight][/white] [tongue]
 
I'll ask around Skip. My thought was there may be some command which does what I need and I just didn't know about it.
 



No network know my actual name. It must be associated with the key value in some table.

Skip,

[glasses] To be safe on the [red]FOURTH[/red],
Don't take a [red]FIFTH[/red] on the [red]THIRD[/red]
Or you might not come [red]FORTH[/red] on the [red]FIFTH[/red]
[red][highlight blue]FORTH[/highlight][/red][white][highlight red]WITH[/highlight][/white] [tongue]
 
Makes sense. So the table must be checked upon selecting the "Check Names" button or upon sending the message. It's typically at that point the names are converted. I guess need find out what table is being checked.
 
Check out the thread labeled "Merge Info from Active Directory to Word 2003" dated 4 July 2007. I think it may solve your problem.

----------------------------------------------------------------------------------
"A committee is a life form with six or more legs and no brain." -- L. Long
 
bdmangum,
Windows means the domain is probably controlled by Active Directory.
[tab]thread705-1230097

Hope this helps,
CMP

[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)
 
Thanks guys for the posts.

CMP,

In your GetObject command does the WinNT need to be replaced by the name of the network my office runs? When I run the code with WinNT I get an error saying the user could not be found. Is there something I need to change?

Thanks,
BD
 
bdmangum,
No but you may have to substitute the Domain name for the Computer name.

Some other useful ADS stuff:

[tab][URL unfurl="true"]www.15Seconds.com > Add to Your ADSI Code Library[/url]

Hope this helps,
CMP

[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top