Command Button

R

ruthie

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.
 
F

fredg

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.

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
 

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