Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / June 2007

Tip: Looking for answers? Try searching our database.

Can't get form to hide

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RobUCSD - 04 Jun 2007 17:17 GMT
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
****************************************************************************************************************
RobUCSD - 04 Jun 2007 18:05 GMT
I fixed this set by looking at previous posts, something I should have done
before posting. Sorry for the mis-fire. Have a great day. Thanks, Rob

>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
[quoted text clipped - 35 lines]
>End Sub
>****************************************************************************************************************
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.