Hello,
I'm trying to create a command button that by default will lock all records
in the form, and will only allow edits after it is clicked, to avoid
unnecessary mistakes. In other words all records are locked until the user
clicks command button to edit each record individually. I would like it so
that you have to click the unlock button for each record you wish to edit. So
that if I unlock one record, then go on to the next record, it too is locked.
And the previous one locks itself again.
Any help would be much appreciated.
Thanks in advance,
Ruth.
ruralguy - 17 Sep 2007 19:03 GMT
You can put the following in the Click event of the Command button:
Me.AllowEdits = True
Me.AllowAdditions = True
Me.AllowDeletions = True
...and in the Current Event of the form put:
Me.AllowEdits = False
Me.AllowAdditions = False
Me.AllowDeletions = False
>Hello,
>
[quoted text clipped - 10 lines]
>Thanks in advance,
>Ruth.

Signature
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.
fredg - 17 Sep 2007 19:05 GMT
> Hello,
>
[quoted text clipped - 10 lines]
> Thanks in advance,
> Ruth.
What about deleting or adding a new record?
Code the Form's Current event:
Me.AllowEdits = False
Me.AllowDeletions = False
Me.AllowAdditions = False
Code the Command button Click event:
Me.AllowEdits = True
Me.AllowDeletions = True
Me.AllowAdditions = True

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail