polly2carpets
Technical User
Hi all,
What I want to be able to do is record the current database user name (i.e. the person currently logged into the database) in a field of a record at the point of its creation. I have seen the thread thread700-1099785 which started off asking a similar question but ended up with a solution to retrieve the current Windows login, which is no use to me.
What I have done is created a database with logins for specific users (security is implemented) to record operational problems at my plant. When I log in with the different IDs, I can see the "current user" is changing by looking at Tools->Security->User and Group Permissions (visible at the bottom) but when I try the scripts shown in thread700-1099785 I always get the windows login ID, not the database current user.
I want the database to automatically enter a persons login name when they go in and create a new record in a field called ReportedBy.
I'm sure there's a way to do it but I can't figure it out. I surely can't be the only person who has wanted to do this... Please help
Once I can get this information, I want to be able to use it elsewhere (e.g. in queries) so that when someone logs in they can run a report to show records that only have actions for them associated with them (filtered for "current user" value)
Thanks,
Polly2Carpets
"I keep pressing "Esc" but I'm still here
What I want to be able to do is record the current database user name (i.e. the person currently logged into the database) in a field of a record at the point of its creation. I have seen the thread thread700-1099785 which started off asking a similar question but ended up with a solution to retrieve the current Windows login, which is no use to me.
What I have done is created a database with logins for specific users (security is implemented) to record operational problems at my plant. When I log in with the different IDs, I can see the "current user" is changing by looking at Tools->Security->User and Group Permissions (visible at the bottom) but when I try the scripts shown in thread700-1099785 I always get the windows login ID, not the database current user.
I want the database to automatically enter a persons login name when they go in and create a new record in a field called ReportedBy.
I'm sure there's a way to do it but I can't figure it out. I surely can't be the only person who has wanted to do this... Please help
Once I can get this information, I want to be able to use it elsewhere (e.g. in queries) so that when someone logs in they can run a report to show records that only have actions for them associated with them (filtered for "current user" value)
Thanks,
Polly2Carpets
"I keep pressing "Esc" but I'm still here