Locking form fields

  • Thread starter Thread starter Howard
  • Start date Start date
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
 
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
 
Back
Top