Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logon as different user in Access 2000 1

Status
Not open for further replies.

danhenderson

Programmer
Jan 19, 2001
5
US
I have an Access database with a workgroup file. I also have an internal "users" table that is used to set special permissions in the application. If a user is part of the workgroup file but NOT in the "users" table, then an error message is generated and the application quits, requiring the user to start the application over to login. Does anyone know how, after trapping the error, I can allow the user to login through the workgroup file again without quitting the application?
 
I don't think that's possible. The original Access logon stores the user name and some security info in the default Workspace object. You can't change that info (that would compromise security) and Access/Jet don't provide an internal logon to change it. You'd have to destroy the workspace and recreate it, but Access won't allow you to do that, either; it must always have the default workspace, which it uses to retrieve your forms, code, etc. from the database.

You could theoretically create a form to get a new user id and password, and then create a second (private) workspace, logging on to that one with the user and password from your form. But only VBA code can use such a workspace; the user interface always uses the default workspace. Although your VBA code could access tables and queries through the private workspace, any forms, reports, and macros would only have the original user permissions. Rick Sprague
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top