VBA (I Think) 
Author Message
 VBA (I Think)


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)



Sun, 15 May 2005 06:40:36 GMT  
 VBA (I Think)
Thanks

Quote:
>-----Original Message-----


>> 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

- Show quoted text -

Quote:
>"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)

>.



Sun, 15 May 2005 19:11:09 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. I think this is a VBA question

2. Basic VBA questions I think?

3. Thinking about WinHelp Tools? Think $$$

4. Is it possible in VB 5 ? I do not think so, What do you think?

5. Is it possible in VB 5 ? I do not think so, What do you think?

6. Is it possible in VB 5 ? I do not think so, What do you think?

7. Is it possible in VB 5 ? I do not think so, What do you think?

8. Is it possible in VB 5 ? I do not think so, What do you think?

9. Is it possible in VB 5 ? I do not think so, What do you think?

10. Thinking about trying VC++? Think again..

11. Is it possible in VB 5 ? I do not think so, What do you think?

12. Is it possible in VB 5 ? I do not think so, What do you think?

 

 
Powered by phpBB® Forum Software