Detect server name

  • Thread starter Thread starter eric
  • Start date Start date
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.
 
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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top