I'm placing a sample database here to demostrate what I'm doing. I have a form that will lock the record once the user has pulled it up on their screen preventing other users from accessing the same record creating write conflicts. However I noticed that if 2 users are pulling going to the next record at the exact same time it does create a write conflict. I thought maybe I could add a timestamp so that access would look at the exact time to see who opened the record first and shut down the other. Any ideas on this? Here is the sample database....
That was my fist try but in a multiuser enviroment with over 10 users accessing the records at the same time I began to receive write conflict errors. Therefore I needed to manually create something that would avoid this. Now I get less write conflicts but if 2 users go to the next record at exactly the same time I will still get a write conflict pop-up message.
depending on what version of Access you are running you shouldbe able to use record level locking, which cam in from 2000 on (JET 4?)
You should not have any problems what soever with that, unless you are doing table locks manually, or are usign some odd priamry key generation.
tools | options | advanced | select "edited record lock"
failing that you will need to switch of record locking and implement your own strategy to handle record contentions.
If 2 users 'go for the same record at the same time" you will always have these problmes..... its par for the course, bno db system can automatically handle that.
In this circumstance the best thign you can do is write your own error handler and try to merge the changes.. good luck. Ive alwasy told my users that its tough.... first person in secures the lock, second person in has to re do their changes later.
On the back of Healdems response; go unbound with your forms, use your timestamp idea and then on save of the record you can code your own procedure to check the timestamp against the original record and prompt the user when necessary.