I am updating an existing database in MS Access 2010 from MS Access 97. The creator of the original database is no longer in our section and it was determined it would be easier to recreate the database instead of trying to figure out how to hand over “Admin” responsibilities.
In the MS Access 97 DB there is a button that will assign a supplier/record to the current user. This button is run off a macro that I have duplicated in the MS Access 2010 DB. All that is stored in the table is the last 5 digits of the users Network Log In. The macro is as follows:
Thank you for the VBA code. I have put the code into my DB as fOSUserName but I do not know how to reference it in my Macro. I have a long Macro that does a SetValue on a field for the user's badge number. I tried referencing the fOSUserName but gets an error saying the expression entered has a function name the DB can't find.
I don't know VBA (that's why everything is in Macros) so I do not know if I need to change anything in the code to match something in my DB.
Any additional assistance you can provide would be appreciated.