Home All Groups Group Topic Archive Search About

How can I lock based on certain field?

Author
5 Sep 2006 8:38 PM
ArthurMailloux
I have created a database that has a form with subforms to enter data, all
based on an Incident_Number field. Incident_Number being the link for all
data tables.

In the main table to store all this data, I have a field for Status, either
Active, or Closed.

How can I make ALL rows with the same Incident_Number that have a Status of
"Closed" become read only for everyone except Administrator? Is this possible?

Author
6 Sep 2006 12:12 AM
Scott McDaniel
On Tue, 5 Sep 2006 13:38:02 -0700, ArthurMailloux <ArthurMaill***@discussions.microsoft.com> wrote:

>I have created a database that has a form with subforms to enter data, all
>based on an Incident_Number field. Incident_Number being the link for all
>data tables.
>
>In the main table to store all this data, I have a field for Status, either
>Active, or Closed.
>
>How can I make ALL rows with the same Incident_Number that have a Status of
>"Closed" become read only for everyone except Administrator? Is this possible?

This doesn't really have anything to do with Access Security, but here's a suggestion:

You can use the form's Current event to determine the status of a record:

Sub Form_Current()
  Me.AllowEdits = (Me!status='Closed')
End Sub



Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com