After update, disallowing edits to continue even after form closur

S

Sam

Hello,

I have a form with a subform within and users update fields on this subform.
In AfterUpdate on fields in the subform I want to lock, I put Me.AllowEdits
= False and it works perfectly. However, I would like the user to be able to
update this field only once and then lock it forever (or update it in the
main table instead of the form later). Currently, it only sticks for that
current open window session. Any way to get this to stick?

Thank you.
 
M

missinglinq via AccessMonster.com

Sam, what exactly do you mean by "I would like the user to be able to update
this field only once and then lock it?" Do you mean enter a value and then
lock the field? Or do you mean enter a value, come back later and update that
value once, and then lock the field?
 
A

Allen Browne

If you want the existing records always locked, why not set the form's
AllowEdits property to True in design mode? Assuming AllowAdditions is also
true, users can enter new records, but not modify existing ones.

If that's not what you need, use the Current event of the form.

If you want to leave some controls editable, see:
Locking bound controls on a form and subforms
at:
http://allenbrowne.com/ser-56.html
 
Top