Locking form fields

H

Howard

I have a subform which allows the user to browse through
labour records for a given task (parent form). Regarding
the subform alone, is it possible to lock the fields
within the subform based on the value of a field within
the subform. For example, I have a status field on the
labour subform. If the status is set to "Work Order
Issued", that record should then be locked so the user can
no longer make changes. While scrolling through, the user
can make changes to other records with different status
values. Please let me know. Thanks!
-Howard
 
J

Jim Allensworth

I have a subform which allows the user to browse through
labour records for a given task (parent form). Regarding
the subform alone, is it possible to lock the fields
within the subform based on the value of a field within
the subform. For example, I have a status field on the
labour subform. If the status is set to "Work Order
Issued", that record should then be locked so the user can
no longer make changes. While scrolling through, the user
can make changes to other records with different status
values. Please let me know. Thanks!
-Howard

Use the subform's On Current event to manage that ...

Private Sub Form_Current()
Me.AllowEdits = Not Me.[Work Order Issued]
End Sub

The above assumes that the status is true/false

- Jim
 

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