Read-only user cannot open form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have created a database for a multi-user environment. I have created account of which some are read-only. My problem is that two of my forms (the most important ones!) automatically load on a new record but a read-only user doesn't have the right to add a new record so access dines them the right to access the form and then closes.

Is there a way around this problem? Is there something I can do differently when creating user accounts/groups to avoid this?

Thanks for your help,

Daniel
 
Daniel said:
Hello,

I have created a database for a multi-user environment. I have created
account of which some are read-only. My problem is that two of my forms
(the most important ones!) automatically load on a new record but a
read-only user doesn't have the right to add a new record so access dines
them the right to access the form and then closes.

If these two forms only open to add records, then there is no point in
giving the read-only users access to the forms at all.

If you have some sort of main form, you can hide the two buttons that open
these forms for the read-only users.
 
Sub btnForm1_Click()
Dim Grp As DAO.Group
Dim Usr AS DAO.User
On error Resume next
Set Grp = DAO.Groups("READONLY")
Set Usr = Grp.Users(CurrentUser())
If Err.value = 0 Then
Docmd.OpenForm "Form1",DataMode:=acFormReadOnly
Else
Docmd.OpenForm "Form1",DataMode:=acFormAdd
End If
End Sub

HTH

Pieter
Daniel said:
Hello,

I have created a database for a multi-user environment. I have created
account of which some are read-only. My problem is that two of my forms
(the most important ones!) automatically load on a new record but a
read-only user doesn't have the right to add a new record so access dines
them the right to access the form and then closes.
Is there a way around this problem? Is there something I can do
differently when creating user accounts/groups to avoid this?
 
Joan,

The forms are used to display inportant information but it load to a new record so that people don't over-write existing information.

does this help at all?!

Daniel
 
See Peter's reply.

--
Joan Wild
Microsoft Access MVP

Daniel said:
Joan,

The forms are used to display inportant information but it load to a new
record so that people don't over-write existing information.
 
I created have a access database that i put in my company's shared folder. I
only want my database to be write/read only for me and rest of the people who
want to view my database as READ ONLY. Is there a way i can create a multi
user environment to assign each user Read or Write access
 
I created have a access database that i put in my company's shared folder. I
only want my database to be write/read only for me and rest of the people who
want to view my database as READ ONLY. Is there a way i can create a multi
user environment to assign each user Read or Write access

Split the database.

The tables should be on a shared backend on the server. Each user should - I'd
say MUST - have their own copy of the frontend, a database containing links to
the tables and all the forms, reports, queries and code.

You can set up the frontend basing the forms on read-only queries so the users
won't be able to mess with the data.

See http://www.granite.ab.ca/access/splitapp.htm for a discussion.
 
John W. Vinson said:
Split the database.

The tables should be on a shared backend on the server. Each user should -
I'd
say MUST - have their own copy of the frontend, a database containing
links to
the tables and all the forms, reports, queries and code.

You can set up the frontend basing the forms on read-only queries so the
users
won't be able to mess with the data.

See http://www.granite.ab.ca/access/splitapp.htm for a discussion.

This prevents users from accidentally editing data, but if you need to
securely prevent a malicious user from updating, you might consider SQL
Server (including the free Express edition) for the backend data. With SQL
Server it's very simple to assign robust security permissions. You can
assign reasonably robust security with an Access backend also, but support
was dropped from the Access 2007 .accdb format and it was never easy to work
with.

If you can do your updates offline, you might be able to put the backend
database on a read-only share with read-only file system permissions for the
users and write permission for you. I haven't tested that and it might cause
problems for multiple users. When you update data, you would copy your
master copy to the server, at a time when no users were in the system. That
would also be secure, but not so convenient if you need to update data
frequently.
 
This prevents users from accidentally editing data, but if you need to
securely prevent a malicious user from updating, you might consider SQL
Server (including the free Express edition) for the backend data.

Absolutely. There's a big diffence between an ordinary user mistakenly
changing data - "I just didn't want those records included in the report since
they're not for my department so I deleted them from the query; that doesn't
hurt anything does it?" and someone who is intentionally and maliciously
trying to damage the database.
 
Back
Top