Print Page | Close Window

Function IsInGroup Sample Database (IsInGroup.mdb)

Printed From: Roger's Access Library
Category: Other Download Libraries
Forum Name: Nathe, Khyle
Forum Description: Khyle Nathe's Library
URL: www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=161
Printed Date: 28 Mar 2024 at 8:38am
Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com


Topic: Function IsInGroup Sample Database (IsInGroup.mdb)
Posted By: Khyle Nathe
Subject: Function IsInGroup Sample Database (IsInGroup.mdb)
Date Posted: 10 Jul 2008 at 3:42am
 

This contains a simple function: Function IsInGroup, which can be used for determining which Group the CurrentUser belongs to. It has been posted in many forms on the Listservs, but I thought it would be a helpful example for others.

Usage Example - to make a button called "cmdAdmin" visible to the CurrentUser if they are a member of the Admins group, otherwise make it false - call in the OnOpen Event of a Form.

If IsInGroup(CurrentUser, "Admins") Then
    Me.cmdAdmin.Visible = True
    Me.cmdAdmin.Enabled = True
Else
    Me.cmdAdmin.Visible = False
    Me.cmdAdmin.Enabled = False
End If

Download Access 97: http://www.rogersaccesslibrary.com/forum/uploads/30/IsInGroup.zip - uploads/30/IsInGroup.zip



-------------
--

Email: (no longer valid. If you have any information, please contact http://www.rogersaccesslibrary.com/forum/member_profile.asp?PF=5 - Roger Carlson through this forum.)



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 - http://www.webwizforums.com
Copyright ©2001-2019 Web Wiz Ltd. - https://www.webwiz.net