I've been really busy over the past month and a half, or maybe longer, and as such haven't been posting here much at all... particularly over the past couple weeks.
Anyway, today I've got a question, in planning for an Access database for a project at work that will involve at least 10 to 12 people, basically as many people as we can put on the project.
I thought I fully understood record locking and how all of that works in Access, but now I'm rethinking that assumption.
So, here's what I want to happen for the record locking on this project:
[ol][li]If a person so much as looks at the record, another person cannot pull up the same record - no error messages, just skip it and go to the next one. [/li]
[li]If a person goes back to a previously viewed record, and no one else is on that record, then also no error messages, no problems.[/li]
[li]I don't care if it needs to be at the database level, application level, or VBA level, though I'd prefer that I can do it in VBA to make sure that it's done on every front end, every machine, regardless.[/li][/ol]
So far, I thought I had this working recently, but ran into some errors.
I set the record-locking level (form level) to "Edited account", and I created a field called "LockedBy" and another called "LockedWhen" to show that a record was "locked". Then I had other code set up in the Form_OnCurrent event that would look to one of those fields (or maybe both), and if it was populated, it would skip to the next account.
I also have some code in there that would always delete ALL locking records matching the user's name, before setting the new one, just in case the last one didn't keep for some reason.
However, some of the lock fields didn't fully clear...
Anyway, in case I'm making this harder than it has to be, I thought I'd post here... not sure whether it should be in the Forms forum, the VBA forum, the tables forum, or this one... so being this one is "Other", I stuck it here.
Sorry I've not included any real details - table fields, vba, etc, but just too busy... I'll try to get some details back here this evening if at all possible... or if not, then next Monday or Tuesday.
Thanks for any thoughts, references, suggestions..
Anyway, today I've got a question, in planning for an Access database for a project at work that will involve at least 10 to 12 people, basically as many people as we can put on the project.
I thought I fully understood record locking and how all of that works in Access, but now I'm rethinking that assumption.
So, here's what I want to happen for the record locking on this project:
[ol][li]If a person so much as looks at the record, another person cannot pull up the same record - no error messages, just skip it and go to the next one. [/li]
[li]If a person goes back to a previously viewed record, and no one else is on that record, then also no error messages, no problems.[/li]
[li]I don't care if it needs to be at the database level, application level, or VBA level, though I'd prefer that I can do it in VBA to make sure that it's done on every front end, every machine, regardless.[/li][/ol]
So far, I thought I had this working recently, but ran into some errors.
I set the record-locking level (form level) to "Edited account", and I created a field called "LockedBy" and another called "LockedWhen" to show that a record was "locked". Then I had other code set up in the Form_OnCurrent event that would look to one of those fields (or maybe both), and if it was populated, it would skip to the next account.
I also have some code in there that would always delete ALL locking records matching the user's name, before setting the new one, just in case the last one didn't keep for some reason.
However, some of the lock fields didn't fully clear...
Anyway, in case I'm making this harder than it has to be, I thought I'd post here... not sure whether it should be in the Forms forum, the VBA forum, the tables forum, or this one... so being this one is "Other", I stuck it here.
Sorry I've not included any real details - table fields, vba, etc, but just too busy... I'll try to get some details back here this evening if at all possible... or if not, then next Monday or Tuesday.
Thanks for any thoughts, references, suggestions..