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
Printed Date: 14 Jun 2021 at 2:46pm
Software Version: Web Wiz Forums 12.03 -

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
    Me.cmdAdmin.Visible = False
    Me.cmdAdmin.Enabled = False
End If

Download Access 97: - uploads/30/


Email: (no longer valid. If you have any information, please contact - Roger Carlson through this forum.)

Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 -
Copyright ©2001-2019 Web Wiz Ltd. -