R
RobUCSD via AccessMonster.com
Could you pls take a look at the code below. The If IsUserInGroup part is
solid because I use it in other parts of my app and it works just fine. It's
the hide the form part that's not working. It still shows up for users other
than admins. I'm not sure why.
Any help is greatly appreciated. Thanks, Rob
****************************************************************************************************************
Option Compare Database
Option Explicit
'-----------------------------------------------------------------------------
----------
' Procedure : Form_Open
' DateTime : 6/4/2007 08:54
' Author : Rob
' Purpose : To maintain a persistent connection to the database to improve
performance, _ &
' also displays current version to DBA
'-----------------------------------------------------------------------------
----------
'
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Form_Open_Error
If IsUserInGroup(CurrentUser(), "Admins") Then
Me.Visible = True
Else: Me.Visible = False
End If
On Error GoTo 0
Exit Sub
Form_Open_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure
Form_Open of VBA Document Form_frmVersion-ConnectionPersistance"
End Sub
****************************************************************************************************************
solid because I use it in other parts of my app and it works just fine. It's
the hide the form part that's not working. It still shows up for users other
than admins. I'm not sure why.
Any help is greatly appreciated. Thanks, Rob
****************************************************************************************************************
Option Compare Database
Option Explicit
'-----------------------------------------------------------------------------
----------
' Procedure : Form_Open
' DateTime : 6/4/2007 08:54
' Author : Rob
' Purpose : To maintain a persistent connection to the database to improve
performance, _ &
' also displays current version to DBA
'-----------------------------------------------------------------------------
----------
'
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Form_Open_Error
If IsUserInGroup(CurrentUser(), "Admins") Then
Me.Visible = True
Else: Me.Visible = False
End If
On Error GoTo 0
Exit Sub
Form_Open_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure
Form_Open of VBA Document Form_frmVersion-ConnectionPersistance"
End Sub
****************************************************************************************************************