Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lock a Record on an on click event

Status
Not open for further replies.

kimmer7389

Technical User
Nov 27, 2001
95
US

I have a form and after a button is clicked I want only that record to lock so that it can not be edited.

Is it possible to lock a record on an on click event on a button?
 
Hi

Set Locking type to pessimistic, to cause lock on edit

There are several ways to invoke the edit, but one would be:

In on click event

Me.recordsetClone.Bookmark = Me.Bookmark
Me.recordsetClone.Edit

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
I'm not sure how to set locking type to pessimistic. Please explain.
 
Hi

In the form, set the .Locked property to CurrentRecord,

You can (if you wish) make this the default locking strategy by setting the appropriate value in Tools\Options

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top