July 18, 2008 at 7:51 am
I need to identify who makes entries into a table record, and I use to have a code to automatically capture the UserName for a table field in Access 2003, now that code does not work.... are there any alternatives to have a field post the UserName into the record.
Using Access 2007 ADP Frontend, SQL Express 2005 backend.
Thanks
July 18, 2008 at 8:17 am
Use the function SUSER_NAME() which will return domain\user_name for windows authentication and user_name for SQL Authentication. If you are using a generic sql login to connect to the database you will need to get the user name using VBA or an Access function.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
July 18, 2008 at 8:31 am
Thanks for the information, Appreciate.
Pete
July 18, 2008 at 9:29 am
Okay, here is where I demonstrate my stupidity with SQL- where do you enter the function in the Table definition? I need to collect the User Names using SUSER_NAME().
Thanks
July 18, 2008 at 9:39 am
Since I have not used Access to modify a SQL table in a long time I'm not sure where it would be, but my gut tells me you should see a Default Value property on the design page for the column. This is where you would put SUSER_NAME().
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply