Currentdb.username

A

Arvin Meyer

belinda shu said:
Hi, how to get the username on currentdb? Hope's this clear.

If you have security enabled with an MDB, you can use the built-in
CurrentUser() function. If security is not enabled, it will return: admin

For the Windows login name use:

http://access.mvps.org/access/api/api0008.htm

For the full name of the currently logged in user:

http://access.mvps.org/access/api/api0066.htm

For a remotely logged in user:

http://access.mvps.org/access/api/api0062.htm

and lastly, for the computer logged in name:

http://access.mvps.org/access/api/api0009.htm

--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://access.mvps.org
Co-author: "Access Solutions", published by Wiley
 
Top