The CurrentUser() function does identify the user who logged in via Access
security. However if you have removed the Open permission on the form for
your group, then no one in that group will be able to open the form.
If you want to block them from even seeing the form, you would be better off
checking the group name and hiding the button that opens the form (I'm
assuming you have some sort of startup form/menu that users use to navigate
around your database, and they don't see the database window.
There is a sample function in the security FAQ you can use to see if the
current user is a member of some group.
http://support.microsoft.com/?id=207793
--
Joan Wild
Microsoft Access MVP
Cily said:
Hi, In the application I have created, I want to identify a particular
group using the workgroup, and I have created my own workgroup and in that
there are particular users, whom I want to block from accessing a certain
form, and in the Access help, I have found a mothod called CurrentUser().
Can this method be used to identify who is logging in and accordingly block
him he is not allowed to access the form? Can anybody help me give some
examples on how to do it?