CurrentUser() & workgroup security (ACCESS 2007)

G

Guest

I want to populate a field with the Windows username of the current user.

I have created a Macro with a SetValue action. In the arguments, I entered
the relevant field as the Item and the Expression as CurrentUser().

When this macro runs, it always populates the field with 'Admin'.

A search of help files suggests I need to enable workgroup security for this
function to work. How do I do this in Access 2007? (If this isn't the
problem, what will make the currentuser() function work?)
 
D

Douglas J. Steele

CurrentUser doesn't give you the Windows username: it gives you the Access
username. And Microsoft removed the ability to use User-Level Security in
ACCDBs (and ACCDEs) in Access 2007 (although you can still do it if the
database is in a previous format).

However, what you want is at http://www.mvps.org/access/api/api0008.htm at
"The Access Web".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top