Read Only in access? Is it Possible?

mohsinhq

Registered User.
Local time
Today, 15:37
Joined
Aug 2, 2004
Messages
90
My Access database is situated in a folder which has permissions to only let some people write into it.

The problem is that we would like users with read access to open the database to view but get the following error:

Couldnt use ...path... File already in use.

The database always has more than one user in it so this may be the root of the error message.

Solutions which cannot be implemented are moving the DB to a higher folder or giving write access to this folder to the read-only users.

Thanks in advance for any ideas.
 
Solutions which cannot be implemented are moving the DB to a higher folder or giving write access to this folder to the read-only users.
Then your read-only users will not be able to open the db if another user is already in the db. All users must have read/write/delete access to the directory that the db is in because they must be able to create/edit/delete the record locking file *.ldb. The *.ldb file stores the info as to who is in the db and which record they have open. The db will not open if the user is not able to write to the *.ldb file.

You can easily use Access security to create a user workgroup for each type [role] of user and assign permissions to each object based on the users role. You can also set the "Allow" property in each form so that a specific user [workgroup] can not edit/delete/add records in that form.

Code:
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Err_Form_Open

    If CurrentUser = "ReadOnlyViewer" Then
        Me.AllowAdditions = False
        Me.AllowDeletions = False
        Me.AllowEdits = False
    Else
        Me.AllowAdditions = True
        Me.AllowDeletions = True
        Me.AllowEdits = True
    End If
    
Exit_Form_Open:
    Exit Sub

Err_Form_Open:
    MsgBox Err.Number & " - " & Err.Description
    Resume Exit_Form_Open

End Sub
 

Users who are viewing this thread

Back
Top Bottom