microsoft access vba code to see if a record is being edited in a multiuser environment.
Posted on 2011-10-18
I have a form called frmtest and a table called test that this form is used to read/write data to the table test. I wanted to know if there is a way to use VBA code to determine if a user is editing that particular record or not. Right now I am using Access 2002 db that opens the db using record level locking and this db is used in a multiuser environment. If I go into the form's design view and look at the properties, the locks setting is set to no locks. I can change it to EditedRecord, but the user gets a circle slash sign on the record selector with the beeping sound from the keyboard indicating that the record is locked. However, this comes with no messages. So I want to be able to test if a record is being edited and if a second user attempts to edit, the user gets a message "This record is currently locked for editing. Come back later." How can VBA accomplish this?