Access Security Question and Admin User

M

Markus

Hallo

I hope some one can help me I have an Access 2000 DB and use the access
security functions for it. What I would like to when the user click on the
exit button I want it to do I a check to see if this current user that's
logged on is he in the admin group if yes then I want to run a few delete
queries if the current user is not a admin user then it must just exit with
out running any queries.

How is this possible what code do I need.

Markus
 
J

Joan Wild

Markus said:
Hallo

I hope some one can help me I have an Access 2000 DB and use the
access security functions for it. What I would like to when the user
click on the exit button I want it to do I a check to see if this
current user that's logged on is he in the admin group if yes then I
want to run a few delete queries if the current user is not a admin
user then it must just exit with out running any queries.

I hope you are referring to a user that's a member of the Admins Group.
There is a function in the security FAQ that you can use to determine if a
user is a member of a group.
http://support.microsoft.com/?id=207793

You need to ensure that you trap all the 'exit' methods; you can't
necessarily count on them clicking on your exit button. You could load a
hidden form on startup. In it's unload event you could check if the user is
a member of the Admins group and run the queries.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top