Like the title says... I have a copy of my front-end db on a shared server so users can copy it to their own computers. The database is still in the development phase, and I'm still making changes to the front-end on a daily basis, then replacing the file on the server so everyone can continue updating their own copies.
The problem is - although I've repeatedly asked my users not to use the copy of the database that is on the shared server....well, let's just say they aren't listening.
Which means I am unable to replace the file with an updated version.
I basically need some code that checks the path of the current db and, if it matches the path of the db on the shared server - display a message, then quit the application.
I've seen something like this on here before, but now I can't find it.
This was my first attempt:
But, when I attemp to compile, it gives me this error: "Invalid Outside Procedure" - (in reference to the path)
Help?
The problem is - although I've repeatedly asked my users not to use the copy of the database that is on the shared server....well, let's just say they aren't listening.

I basically need some code that checks the path of the current db and, if it matches the path of the db on the shared server - display a message, then quit the application.
I've seen something like this on here before, but now I can't find it.
This was my first attempt:
Code:
Dim stLOCATION As String
stLOCATION = "path to db on server"
If Application.CurrentProject.Path = stLOCATION Then
MsgBox "You can not open the Database in this location. Please copy the file to your own computer."
DoCmd.QUIT
End If
But, when I attemp to compile, it gives me this error: "Invalid Outside Procedure" - (in reference to the path)
Help?
Last edited: