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 SkipVought 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 after change in data

Status
Not open for further replies.

DPACAccessWiz

Technical User
Mar 30, 2002
15
0
0
US
I have payroll application where I would like to lock one record at a time when a Yes/No field has been changed.

I would also like to lock that record based on a users security level.
 
Once the field has been ticked, you need to force a save (i.e. form requery) and the reopen the form, without closing it as read-only.

e.g.


Forms("MyForm").Requery
DoCmd.OpenForm MyForm, , , MyUniqueID = CurrentUniqueID , acFormReadOnly

The record will now be locked.. Obviously check you can test the user id as to whether you force this..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top