Blocking users from "opening exclusively"?

  • Thread starter Thread starter Bob Allen
  • Start date Start date
B

Bob Allen

How can I keep someone who is a regular user of the
database from opening up "exclusively", even if they
have "open exclusively" checked in their options.?

Thanks.

Bob
 
If they are opening the database exclusively, this code sets Access to
opening the database as shared, and then throws them out of the database.

Function TestOpenStatus()
Dim X As Variant

X = Application.GetOption("Default Open Mode for Databases")

If X = 1 Then
MsgBox "Please open this application in shared mode.", vbOKOnly,
"Error"
Application.SetOption "Default Open Mode for Databases", 0
Application.Quit
End If

End Function

You can put the function in the OnOpen Event of every form, if necessary.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top