Full Version: Capturing user ID onto access table
UtterAccess Forums > Microsoft® Access > Access Forms
Hi All,
I am creating a fairly basic multi-user database. I like to be able to capture User IDs, onto a table (automatically) once a user logins with their ID.
Any ideas?
Thanks All
See if this has the answer you are looking for.
Welcome to UA forums.
Do you have any security set up in place already? If so what are you using? Are you using the build in ULS (User Level Security) or a custom approach.
Good luck
thanks Balaji and HTH.
I am using the buildin ULS, and I am just looking for the userid in Access, and not the network UserID (though that's a neat idea but I am not too sure how to use that piece of code in my database, which at this point has no code.
Any other ideas?
Thanks again
then you can just use the CurrentUser() function which will return the currently logged in user unless the application is not secured with ULS (then it just returns the default admin user).
BTW (by the way)...my name is not HTH sad.gif...it means Hope This/That Helps.
Good luck
I've been trying to use something like this to track the amount of records created per user.
I'm trying to do this, by creating a text field in each table with the default value: CurrentUser()
but when I try to save the table, Access pops up an error message stating for example:
"Unknown function 'CurrentUser' in validation expression on 'Accounts.User' "
My knowledge is fairly basic, and I would appreciate any advice.
Should have mentioned this is in access 2003..
When using CurrentUser() as the default are you putting the equals sign (=) in front of it?
It needs it, if you haven't been using it.
Thanks for the reply, yes, I have tried this with and without the "=" with no change in result.
had initially not being using an "=" because whan I used "Now()" it worked without it.
I've not been able to resolve this, but as an alternative I'm using a solution suggested here, and making the field's default value as
Just posting the link in case anyone else is stumped by/googles this. Still not sure why CurrrentUser() doesn't work.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.