Open VisualBasic help and do a search on the RecordLocks property:
Example
The following example sets the RecordLocks property of the "Employees" form
to Edited Record (a page of records is locked as soon as any user starts
editing any field in the record and stays locked until the user moves to
another record).
Forms("Employees").RecordLocks = 2Hope this helps
--
/ Sean the Mc /
"Opinions are like flatulence - everyone loves the sound of their own, but
anyone else's usually just stinks !"
-anonymous
"Nawab" <na******@hotmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
I need to lock a record after a user clicks on a button on my form.
Does anyone have any idea how to do this. I tried to create a command
button on my form which uses a vb procedure but cannot figure out how
to lock the record. Am novice VB user.
Thanks
Nawab