Error Accessing File

R

Ra

Hi All,

I have this issue with a laptop computer (A - Office2003 with Access2000),
where I have a database application. I have a work copy of the db on another
machine(B - Office2000 with Access2000). I created a form with some coding on
machine B and compiled it. I imported the form onto machine A, along with the
tables/queries affected.
The issue is that the code will not compile on A, and I get the Error
Accessing File error. If I delete the form I just imported it will go away
from the Forms collection, however it will not delete in VB. Then when I open
the db it will message that it can not find the form I just deleted.

Thank you in advance,
 
D

Dirk Goldgar

Ra said:
Hi All,

I have this issue with a laptop computer (A - Office2003 with Access2000),
where I have a database application. I have a work copy of the db on
another
machine(B - Office2000 with Access2000). I created a form with some coding
on
machine B and compiled it. I imported the form onto machine A, along with
the
tables/queries affected.
The issue is that the code will not compile on A, and I get the Error
Accessing File error. If I delete the form I just imported it will go away
from the Forms collection, however it will not delete in VB. Then when I
open
the db it will message that it can not find the form I just deleted.


I'm not sure about this, because the chain of events as described doesn't
seem to match exactly, but it could be related to this bug in Access 2000:

http://support.microsoft.com/default.aspx?scid=kb;[LN];304548

If that's it, Office 2000 SP3 fixes the bug, but that won't repair your
corrupted database.

To attempt to recover from the corruption, first try decompiling the
database and see if the problem goes away. Here's how:

1. With the database closed -- no users in it at all -- and (ideally) Access
not running, make a backup copy.

2. On the task bar, click Start -> Run...

3. Enter this (adapted to match your database path and name) in the Run
dialog box and click OK:

msaccess.exe /decompile "C:\My Documents\YourDBName.mdb"

You may need to include the full path to msaccess.exe, but I don't find that
to be the case when I try it. Depending on your Access version, you may not
get any sign that anything in particular happened. Your database will
probably open in Access.

4. Compact and Repair your database.

5. Open the database again, press Alt+F11 to switch to the VB Editor, and
click Debug -> Compile (your project). If any errors appear, fix them and
recompile.

6. Close the VB Editor. Compact & Repair again.

See if the problem has disappeared.

If that didn't fix it, you'll have to resort to a backup, or else try
importing all objects to a new database -- some objects probably won't
import, and you'll have to recreate them from scratch. When you do import
the objects, unless you've applied the service pack I mentioned above, it is
*crucial* that you compile and save the project before closing the database.
 
R

Ra

Thank you all for your answers. I upgraded to Access 2003, and imported
everything into a new db. I did not seem to find that SP3 installed, that
corrected that dll issue, prior to the said upgrade. The issue went away.

Dirk Goldgar said:
Ra said:
Hi All,

I have this issue with a laptop computer (A - Office2003 with Access2000),
where I have a database application. I have a work copy of the db on
another
machine(B - Office2000 with Access2000). I created a form with some coding
on
machine B and compiled it. I imported the form onto machine A, along with
the
tables/queries affected.
The issue is that the code will not compile on A, and I get the Error
Accessing File error. If I delete the form I just imported it will go away
from the Forms collection, however it will not delete in VB. Then when I
open
the db it will message that it can not find the form I just deleted.


I'm not sure about this, because the chain of events as described doesn't
seem to match exactly, but it could be related to this bug in Access 2000:

http://support.microsoft.com/default.aspx?scid=kb;[LN];304548

If that's it, Office 2000 SP3 fixes the bug, but that won't repair your
corrupted database.

To attempt to recover from the corruption, first try decompiling the
database and see if the problem goes away. Here's how:

1. With the database closed -- no users in it at all -- and (ideally) Access
not running, make a backup copy.

2. On the task bar, click Start -> Run...

3. Enter this (adapted to match your database path and name) in the Run
dialog box and click OK:

msaccess.exe /decompile "C:\My Documents\YourDBName.mdb"

You may need to include the full path to msaccess.exe, but I don't find that
to be the case when I try it. Depending on your Access version, you may not
get any sign that anything in particular happened. Your database will
probably open in Access.

4. Compact and Repair your database.

5. Open the database again, press Alt+F11 to switch to the VB Editor, and
click Debug -> Compile (your project). If any errors appear, fix them and
recompile.

6. Close the VB Editor. Compact & Repair again.

See if the problem has disappeared.

If that didn't fix it, you'll have to resort to a backup, or else try
importing all objects to a new database -- some objects probably won't
import, and you'll have to recreate them from scratch. When you do import
the objects, unless you've applied the service pack I mentioned above, it is
*crucial* that you compile and save the project before closing the database.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 

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

Top