change path

Chimp8471

Registered User.
Local time
Today, 14:19
Joined
Mar 18, 2003
Messages
353
The database i currently use is on a network server on the following path:

\\Tech02\OeeData\oeedata.mdb

and in one of the forms the following reference is used:

Set dbs = DBEngine.Workspaces(0).OpenDatabase("\\Tech02\OeeData\oeedata.mdb")

i have a front end which is linked to the backend

Frontend is called OEE
Backend is called oeedata

both of which are in the same folder.

my question is i want to copy this database(completly) to my laptop and use it when not connected to the network, however it keeps looking to the above path, is there a way to change the above path so that it looks to the local pc for the file??
 
Chimp8471 said:
is there a way to change the above path so that it looks to the local pc for the file??
You need to relink your front end to where you have copied the back end. From the menu bar of the front end you need to click the following...

Tools
Add-Ins
Linked Table Manager
Click the Select All button
Check the Always prompt for new location
Click the OK button
Browse [and select the file] to where you copied the back end to
Click the Open button to relink the copied front end tables to the back end

HTH
 
hi thanks.....

Help needed fast please! (Sorry dont mean to be pushy)

i have linked the tables etc together.....but the

Set dbs = DBEngine.Workspaces(0).OpenDatabase("\\Tech02\OeeData\oeedata.mdb")

is referenced in some of the forms....so by just linking the tables hasn't solved my whole problem...i have been in and changed the location manually buteach time the drive letter changes on my laptop it fails to recognise the path, the drive letter changes depending on the configuration of my laptop,

someone suggested storing the path in a table then referencing that.....i am happy to do this but again i have no idea how to set up the table to do this... or reference to it...

Andy
 
Instead of...
Set dbs = DBEngine.Workspaces(0).OpenDatabase("\\Tech02\OeeData\oeedata.mdb")

Try...
Set dbs = CurrentDb()

You should not be using drive letters in your linking and setting. You should only be using UNC [\\server\partition\directory\file name]. That will eliminate the drive letter problems as long as the path is the same.
 

Users who are viewing this thread

Back
Top Bottom