5 pts.
 run vba code as admin
I am currently working on an ms access application for a large insurance company which generates reports for the user after the user inputs/select some data.... Unfortunately the application has already been built - and till now we used to run the application/reports by logging in as admin.. however, we now want that users login to the database as a 'user' with limited privileges- but the vba code, which is locked to run with privileges as admin. Our plan is users sign onto this ms access application/database as a user with few privilegese on the underlying tables/forms..all the tables and forms and vba modules are owned by admin....we dont want the user to be able to view most of the tables but we want the entire vba code to run with the privleges as admin.. how do we do that.. the user logs on to ms acesss db as a regular user, with privileges on very few tables/forms.. and the background vba code which generates the code runs succesfully with privlegse of the admin user.. is that possible..we want to allow the user to keep this ms access database/application on any directory they wish on their local pc. thanks again, chandran gangadharan Toronto, Canada

Software/Hardware used:
ASKED: March 8, 2008  11:56 PM
UPDATED: May 13, 2009  3:18 PM

Answer Wiki:
You can use the VBA command: Shell() to execute SysInternals <a href="http://technet.microsoft.com/en-us/sysinternals/cc300361.aspx">ShellRunAs</a> or <a href="http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx">PsExec</a> to execute command line instructions on local or foreign machines. However, that would require storing the elevated credentials somewhere Access can read them,.. there may be Security-safe ways to do that, but I'm not familiar with them. Alternatively, if you're running MS-SQL Server somewhere in your domain, you can set up Stored Procedures to execute the instructions as a specific user while granting priviledges to execute the SP to other users. If you're running the SQL Server in an Active Directory domain on a machine other than the Domain Controller, you'll need to set the DC to trust the SQL Sever computer for Delegation (Active Directory Users and Computers). Other SQL Server software may also have similiar functions/features. Jordan Lewis Business Automation http://www.jlew.org/
Last Wiki Answer Submitted:  May 13, 2009  3:18 pm  by  JLEW   15 pts.
All Answer Wiki Contributors:  JLEW   15 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _