+ Reply to Thread
Results 1 to 6 of 6

Need Help Please In restricting access to users in Access 2010

  1. #1
    Registered User
    Join Date
    01-30-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    16

    Need Help Please In restricting access to users in Access 2010

    I have created a DB which has tables,queries, forms, macros & reports and i want to restrict access to read only for the users as the DB will be placed in data share . Please advise how do i do it in Access 2010.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 VersionVersion 2410 Win 11
    Posts
    24,336

    Re: Need Help Please In restricting access to users in Access 2010

    Here is a method that I have used successfully.

    http://www.mrexcel.com/forum/microso...ns-system.html
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    01-30-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Need Help Please In restricting access to users in Access 2010

    Alan,

    i am getting a compile error stating sub or function not defined. Please advise.

    Private Sub Form_Load()

    Dim sPermit As String
    Dim iAccess As Integer
    Dim Ctl As Access.Control
    Me.txtUser = Environ("username")
    If IsNothing(Me.txtUser) Then
    sPermit = "ReadOnly"
    Else
    sPermit = GetPermission(Me.txtUser)
    End If
    Select Case sPermit
    Case "Edit"
    iAccess = 2
    Case "Admin"
    iAccess = 3
    Case Else
    iAccess = 1
    End Select
    Me.txtLevel = iAccess
    End Sub

  4. #4
    Registered User
    Join Date
    01-30-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Need Help Please In restricting access to users in Access 2010

    Adding to the below, i have multiple tables,forms, queries, reports & macro. Can i give read only access for everything using the code once or do i need to use it multiple times.

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 VersionVersion 2410 Win 11
    Posts
    24,336

    Re: Need Help Please In restricting access to users in Access 2010

    Which line of code is highlighted when you open the VBE after getting the compile error. Click on the link below in my signature about debugging.

  6. #6
    Registered User
    Join Date
    01-30-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Need Help Please In restricting access to users in Access 2010

    Private Sub Form_Load() is highlighted and it stops at IsNothing in the code.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1