Path of an Access DB

ndendrinos

Well-known Member
Joined
Jan 17, 2003
Messages
1,694
Hello to all,
Had to change computers lately and have this problem.
One of my reports in a DB created on the old computer is not working on the new.
When I try to open the report I get an error message to the effect that the path cannot be found and to check if I'm on the correct server etc...

Path w/ old computer was: C:\Documents and Settings\Desktop
Path w/new is:C:\Documents and Settings\Nick\Desktop

How can I edit the path?
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Check in the report to see whether the path is hard-wired as a constant in the code, or whether it points to a particular field value. If so, change it there.
Also, if the report is meant to work on the SAME database as the report, you should not have any issues -- unless, of course, the path is hardwired as above.
In code, you can define the path of the current database using CurrentProject.Path

Hope this helps

Denis
 
Upvote 0
Hello Denis,
Worth mentioning perhaps is that the offending table in the table screen had an arrow to the left of its name and still has it now that it works.

Not sure how this works but here is the Read file I have added to the DB folder that explains what I did:

" In an Access database if you have a problem with the path do this:
Right click on the problem Table and choose "Linked table Manager" select the table in the little square at the left of the Table name and click OK ,,, the path will now change. "

Maybe all this has nothing to do with anything but if you feel that it addressed this infernal "Path" problem then maybe you could comment for the benefit of us all.

Many thanks as usual for your kind help
Regards,
Nick
 
Upvote 0
Hello Nick,

OK, looks like you are working with a linked table. Yes, if things get moved around those links will break and give you errors any time you try to use the data.
The Linked Table Manager works well for fixing that problem, but sometimes I do the following instead:

1. Select each linked table icon (the ones with the arrows) and delete them. Yes for the confirmation message that will pop up every time. Don't touch the ones without arrows.

2. File | Get External Data | Link Tables. When the dialog pops up, navigate to the database containing the table(s) that you want to link to. Click Open. Normally you are connecting to all tables so Select All, otherwise just select the table(s) that you want to link to. Click OK and in a couple of seconds, you will have a full set of linked table icons in your database.

I mentioned this because the Linked Table Manager sometimes spits the dummy and prompts you for a location for every linked table. If so, Cancel and do as I described above.

Denis
 
Upvote 0

Forum statistics

Threads
1,214,655
Messages
6,120,760
Members
448,991
Latest member
Hanakoro

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top