General information
Category:
Coding, syntax & commands
I had the same problem, and used the following solution.
I created a table with one record. In the init event of your form, simply attempt to lock this one record from the table. If you are successful, then the user can continue with the form. If not, simply release the form with a message saying that this form is being used by another. This one record could store the name of the person that is currently using the form, so at least all subsequent users know who to contact if they wish to complain !!!!
I found this to be far simpler than using semaphore locking, or using flag files. If there is an abnormal termination, then the lock will automatically be released anyway. You could also use a timer event on the form to check for inactivity, or perhaps have a maximum amount of time that one user can monopolise the form.
Derek
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only