when a user opens a form, you could record that that record is checked out, the time, and the user. If someone else trys to open a checked out record, check and see if the time that a record is allowed to be checked out has expired with no changes from the original user. If 2 hours have gone by(for example), and the first person who checked out a record hasn't done anything with it, they're probably just leaving it sitting there.
When a user goes to save the changes they've made to the record, check and see if that record is still checked out to them, or if they waited too long and someone else has it checked out.
I hope this makes sense.. If not do some searches on document managers and CVS systems. Good luck..