Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determine if another user has a form open

Status
Not open for further replies.

slreynolds

Technical User
Oct 11, 2001
29
0
0
US
What I would like to know is if there a way to determine if another user has a form open?

I have multiuser database that is generally wide open and all functions are available to all users all of the time.

I have one form that I would like to restrict to only one user at a time. I have set this up by having a flag field in the underlying table set to "yes" when the form is loaded and to "no" when the form is closed - the code checks to see if the flag is "yes" on open and won't let another user in if it is. This works OK 99% of the time - but if a user crashes and reboots with the flag set to "yes" then no one can open the form until I go in and manually fix it. I may want to go on vacation some day - so I'd like a cleaner solution.

Thanks

Susan
 
Hello...

I had the exact same need and all i did was make the form lock (all records) onto a DUMMY table that was never required. When you click on the button that loads the form, if another form has locked the table, the form wont load and an err will be outputted by access which can be trapped by you using the on ERROR event. For my case I trapped ze error and outputted to ze user the NT/2k login name of the guy currently using the form.

Hope zis helps. Me will be glad to give you a sample database if u need one.... Taha
thamiral@uwo.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top