Code to check for Shortcuts (1 Viewer)

LadyDi

Registered User.
Local time
Yesterday, 18:50
Joined
Mar 29, 2007
Messages
894
I have a database that is split and I want the users to have a copy of the database on their harddrive, instead of using it off the network drive. The problem is that some of my users are over seas and the desktop on their computers is linked to a network. I have code that works great if the harddrive is a C or a D. However, I am having a lot of trouble getting it to work with the network drive because it isn't assigned a letter (it starts out something like this \\ad.company.com\user\Homedirs). Could you tell me how to get my code to allow this as a harddrive? Is there a way to do a nested Case statement? Below is the code that I am currently using. Any assistance you can provide would be greatly appreciated.

Code:
Select Case Left(CurrentProject.Path, 1)
            Case "C", "D"
              ' Do nothing
              
            Case Else
               MsgBox "Run this database from a copy on your desktop not a shortcut or off the server", vbCritical, "Error"
                Application.Quit
  End Select
 

Users who are viewing this thread

Top Bottom