Stop use of shortcuts to open database

Alan Durie

New member
Local time
Today, 23:04
Joined
Dec 7, 2010
Messages
2
I want to stop users creating a shortcut and then they all open the same frontend version of the program. As I want then to use an individual front end each.

So I want the access database to check if it was started through a shortcut and then rxit and stop.

Many thanks in advance

Yours Alan
 
You could check to see if the CurrentProject.Path (which shows the path of the currently opened database) doesn't have C or D (depending on where the frontend should be loaded) as the path. So, like this:
Code:
Select Case Left(CurrentProject.Path, 1)
     Case "C", "D"
       ' Do nothing
     Case Else
        Msgbox "Run your frontend for this database that is on your computer instead of on the server", vbCritical, "Error"
   Application.Quit
End Select
End If
 
Have them all create a shortcut to a BAT file that will copy the latest version of the database to a local directory. This also gives you the flexibility to replace and update a version of the database while work continues with the old one till the reopen the database with the bat file. You can get quite smart with checking if the have the latest version locally, then copy the latest if need be and start it. You can also delete older version from the local user directory.o
 
On other option if your using a mdw shortcut with permissions any user that opens a database frontend or backend will automatically get the username of "Admin". So you can boot anyone that tries to log in as "Admin" using the currentuser function built into access.

Otherwise with a mdw it will return the persons logon name.
 

Users who are viewing this thread

Back
Top Bottom