disabling records in a table/query

J

Jomark

Is it possible to disable records in Access in a table/query similar to
Protection in Excel such that some records are read only whilst the others
are able to be edited?
 
P

Pete D.

No,the users should not see the tables or queries especially if you need to
protect the data. Present the data in forms and reports to the user and
protect the fields using the forms/reports.
 
D

Dominic Vella

Right click on the tables, select properties and tag the 'Hide' checkbox.

Anything else is really better done with SQL server.

Dom
 
M

magmike

As has been suggested, all user access to records should be by way forms only.
Doing that, you can set properties of either the form or individual controls
so that some records can be conditionally locked.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

http://www.accessmonster.com/Uwe/Forums.aspx/access/200809/1

If you want individual records from a table to be locked while others
from the same table are not, and you do go the route suggested above,
by hiding tables and queries from your users and using forms to
display the data, you could do the following:

1. Create a Yes/No field in your table called "Private" or "Locked" or
something. When a record is created you can choose to mark it "Locked"
by checking a check box on your form.

2. Code your form to disable (but still display the data) the fields
based on the "Locked" field. For example:

In the OnCurrent of your form,

If Me.LockedField = True Then
Field1.Enabled = False
Field1.Locked = True
Field2.Enabled = False
Field2.Locked = True
End If

I may not have this code exactly right, but that is the idea. Using
this strategy, when your user is viewing records, they could edit
data, unless the record has the "Locked" record field checked. Of
course, you will either want to ensure that the "Locked" field is
either hidden, or also locked and disabled if checked.

magmike

(just a hack, but trying to help)
 
Top