Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Nov 2001
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Security Error (Access 2000)

    I have established security on forms and used the code below for the buttons on the main menu. When someone clicks on something they do not have access to - Access Gives an Error and freezes. I was wondering if there is something I can add like an if.error type statement and display my own message stating they are not authorized vs the Error Access is generating.

    Private Sub MainMenuButtonAthetes_Click()
    DoCmd.Echo False
    DoCmd.Close
    DoCmd.OpenForm "frmMenuAthletes"
    DoCmd.Echo True
    End Sub

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Security Error (Access 2000)

    Have a look at this thread
    Francois

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Security Error (Access 2000)

    At the very least, you need to add On Error Resume Next before the DoCmd.Echo False statement. Otherwise, an error encountered when closing or opening a form will have exactly the result you described. Temporarily, you can comment out the DoCmd.Echo False to see what kind of an error is actually occuring and whether you need any further handling.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •