Detect server name

E

eric

Is there a way (i'm sure there is) to detect is a
specific server or database path exisits? What I want
to do is make my access database inoperative should it be
moved from my network server (don't care what path) to
someones home computer or office server.
 
D

Douglas J. Steele

http://www.mvps.org/access/api/api0003.htm at "The Access Web" will return
the UNC path of any mapped drive. You should be able to use that together
with CurrentDb().Name if you haven't split the application into a front-end
and back-end, or with the Connect property of the TableDef objects if you
have.
 
A

Arvin Meyer

If you haven't split the database to front-end (code, forms, reports,
queries) and back-end (data tables), do so now (there's a wizard under
database utilities) and put the front-end on each workstation. You can then
use the Dir() function from the workstation to check for the existance of
the back-end, and delete most of the app if you don't find it. What will be
left is the one form that is running the code.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access
 
Top