> I have a form were I changed the lock property to yes for every field
> to keep Users from editing the data by mistake. The reason I locked
[quoted text clipped - 13 lines]
>
> Is there something I'm missing?
Yes, the fact that AllowEdits has nothing to do with the Locked property of your
controls. If you have individual controls set to Locked = Yes then your button
will have to execute code that sets all of their Locked properties back to No.
Pretty easy to do in a loop. I usually give all of the controls a common Tag
property ("Lock" for example) and then...
Dim cnt as Control
For Each cnt in Me
If cnt.Tag = "Lock" Then cnt.Locked = False
Next cnt

Signature
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Tony Fairfield - 14 Apr 2005 00:29 GMT
Hi Rick,
I changed all the field property tag to "Lock" and added your code to the
button. I received a run-time error "438 "object doesn't support this
property or method. It highlighted "cnt.Lock"
Is there something I forgot to add?
Thanks again!
Tony
Tony Fairfield - 14 Apr 2005 00:48 GMT
okay, it works now, but only for the text boxes. It doesn't work for the 2
subforms. I changed the tag for them to "lock", but they are still locked
after running the loop.
Is there a way to unlock the subforms with this routine?
Thanks,
Rick Brandt - 14 Apr 2005 02:47 GMT
> okay, it works now, but only for the text boxes. It doesn't work for
> the 2 subforms. I changed the tag for them to "lock", but they are
[quoted text clipped - 3 lines]
>
> Thanks,
I just tested it on a subform and it worked fine for me.

Signature
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Tony Fairfield - 14 Apr 2005 03:09 GMT
I placed the code in beforeupdate and afterupdate, changing from true to
false. That worked for me.
I was stuck on this one. Your code really helped.
Thanks for your help!
Tony