Quote:
> Hi not sure if I am in the right room for this but here
> goes. I have a database and I would like on the front
> screen to return the currently logged in user. I can do
> this by creating a txt box and setting the control source
> as =CurrentUser now that gives me the user name. Now then
> lets say Joe Blogges has the the userID of JB (Keeps it
> simple) when he logges in I would like one txt box to give
> out his name ie Joe Bloggs and another one to return his
> usr ID (=CurrentUser). How can I achieve this?
You'd need to have some means whereby Access can determine that UserID
"JB" corresponds to UserName "Joe Bloggs". If you have a table
containing this information, say, tblUsers with text fields UserID and
UserName, then you could have a text box with controlsource
=DLookup("UserName", "tblUsers", "UserID=CurrentUser()")
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)