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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to get from Currentuser () to Last Name, First Name...

Status
Not open for further replies.

JonWolgamuth

Technical User
Apr 19, 2001
53
US
This is going to be difficult to describe. I've decided to investigate the possibility of using the user's login ID (a 6 letter "word" like TJWWLI) to identify them as they enter records to a table. I found some code which can identify this login ID (called "getusername"), but I cannot figure out where to go from here. The user's used to select their name from a combo box. Now I just want the computer to see their login ID, and select their Last Name, First Name from the corresponding record on the User Table.

Anyone? I'm getting frustrated...
 
Jon,

Sounds like the DLOOKUP function might suit your needs. Take a look at Access' help for this function.


Mickey
 
Sounds like ... a bad idea gone awry.

Actual names of users occassionally vary (mariage / divorce). USER names SHOULD NEVER be changed. If you want to display actual names (in forms / reports), maintain a table with the info you want (Salutation / title / Last Name / First Name ...). Join this table to your recordsources and just pick off the parts used for the output.


MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
User Table with the minimum following fields:
FirstName, LastName, LoginName

Its the Database Administrator's responsibility to maintain this table.

Now you can write an easy function to return the user's name.
e.g.:
= DLookup("[Firstname] & "" "" & [LastName]", "Users", "LoginName =" & """" & CurrentUser() & """")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top