View Full Version : Record Locks property


arage
01-29-2002, 05:46 AM
Record Locks property
My form has its recordLocks property set to no.

I would however like to lock any single record if certain criteria exists. Problem is that the has too many fields to make something like me.SomeControl.Locked = true a good choice. Is there some other, better way to get at the record & lock it all in one fell swoop then?

D B Lawson
01-29-2002, 06:17 AM
Tools/Options/Advanced/Edited Record should do it.

arage
01-29-2002, 06:20 AM
Sorry, I meant to say can I get to it thru VBA? B/c it is I who will lock a user from editing a record, not the user doing this on their own by using your method.

Pat Hartman
01-29-2002, 07:20 PM
The form has several properties that you can toggle - AllowAdditions, AllowEdits, AllowDeletions to prevent a record from being updated. Place your code in the Current event.

If some condition Then
Me.AllowEdits = False
Me.AllowDeletions = False
Else
Me.AllowEdits = True
Me.AllowDeletions = True
End If

PS - the Record Locks property is refering to how Jet manages concurrent updates in a multi-user environment. It doesn't have anything to do with your application preventing a user from updating a particular record.

[This message has been edited by Pat Hartman (edited 01-29-2002).]