How can I lock based on certain field?

A

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?
 
S

Scott McDaniel

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top