I have created an application in Access 2000. I have multiusers using this application. Like usual application, I have about 29 different forms.
I want to know if one of the users has opened a perticular form. Meaning If any of the users is working on that form (In-use), I want to ristrict another user to open that form. Two user at the same time should not open that perticular form. I may display a message for the second user that "The Form is in use by another user" or something like that.
Is there any way to check it?
Please note that I want to do this with only one of the Forms.
First of all I am greatly thankful to you John. I think the first option should work. I am also Thankful to izy as he came out with a thought that could be the case!! Finally BOTH of you gave me the solution for problems expected by each-other!! You both guys are great. Thanks a lot for your help and I do admire you knowledge. I think I need lot more experience to answer this kind of questions... I would try each option one-by-one and let's see which works the best...
Your right. I remember seeing in my Developers Handbook (Which is unfortunately (and strangely) on my bathroom floor at home) a module for checking for locking (both pesimistic and opportunistic) and dealing with it.
The way the code is at the minute it would prob. give a runtime error saying the records was locked by onther user.
I'll have a look (at the Dev Handbook) when I get home. Unless you've got one Izy? I think it's chapter 8/9 ish.
On error goto ErrorBit
if rs![isformopen] then
msgbox"Form in use"
rs![isformopen] = true
if err.number = 3260 then
msgbox"Click here is a sec or two"