Thanks for this, tried the CurrentUser() as you say it returns Admin, I am
using Access 2007 and trying to find a way to to pick up the userId of the
current user.
I have also tried usedname, and userid
What "UserID" or "UserName" did you expect to obtain? Workgroup security is
no longer supported in Access 2007, so you can't obtain the Access login
name, which is the purpose of CurrentUser(). The Windows username may quite
possibly be the same on multiple machines in a network, so could well be
duplicated if you found the API for that. Network Login seems to me to be
your best bet at actually identifying the user.
I just thank my lucky stars that they retained CurrentUser() and return
_something_, so all my users' databases don't crash when they are executed
after being converted to Access 2007.
Larry Linson
Microsoft Office Access MVP