Question about exiting and admin rights

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hallo

I hope some one can help me I have a exit button and when the person click
on it I want access to see is this user a admin user or not and if admin yes
then run a delete query if not admin user then don’t run the query and just
exits.

Thank you
Markus
 
For Each MyUser In DBEngine(0).Users
If MyUser.Name = DBEngine(0).UserName Then DoCmd.RunMacro
"MyDeleteQuery"
Next
 
Hi

How does VB know if the user is in the ADMIN group?

I would like to do certain functions in my data depending on whether a user
belonged to a particular security group or not. Is ther a way to verify if
the currentuser() is in a particular group?


Tom
 
If you are just looking for a user use the currentuser() function which
will return the current user name.

if currentuser()="admin" then .........
 
Hi Tom, sorry for the misguidence. The For statement should be

For Each MyUser In DBEngine(0).Groups("Admins").Users
 
Back
Top