"Error Accessing File"

G

Guest

Hello,

I have a few forms that work like switchboards. They're just menus to access other forms and reports. They've been working fine, but all of a sudden, when I try to select something from them, I get the message "Error accessing file. Network connection may have been lost." (But my database is not on the network. It's on my desktop.) When I click OK, the VBA window pops up, and when I close that, I get a message that it will stop the debugger.

Help!
 
D

Dirk Goldgar

Avyn said:
Hello,

I have a few forms that work like switchboards. They're just menus
to access other forms and reports. They've been working fine, but
all of a sudden, when I try to select something from them, I get the
message "Error accessing file. Network connection may have been
lost." (But my database is not on the network. It's on my
desktop.) When I click OK, the VBA window pops up, and when I close
that, I get a message that it will stop the debugger.

Help!

See this KB article describing the nasty bug that may have bitten you:

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

If that article describes your situation, Office 2000 SP3 fixes the bug,
but that won't repair your corrupted database. 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, it is *crucial* that you compile and save the project
before closing the database.
 
T

Tom Ross

That error indicates a corrupted form. When you import or copy a form or
report that contains embedded VBCode, this can happen. I have always had to
rebuild my databases from backup when this happened. The data files should
all be intact in your damaged database. Which Access version are you using?

If you do import or copy a form or report containing embedded VBCode, you
must compile the database immediately. this seems to prevent it. Sometimes
I cut the code from the form (paste into the notebook for safekeeping).
Import the form without code, paste the code back into the imported form.
(But then some days I get very paranoid about my data)

Some of the MVPs have links to pages that discuss this.



Avyn said:
Hello,

I have a few forms that work like switchboards. They're just menus to
access other forms and reports. They've been working fine, but all of a
sudden, when I try to select something from them, I get the message "Error
accessing file. Network connection may have been lost." (But my database
is not on the network. It's on my desktop.) When I click OK, the VBA
window pops up, and when I close that, I get a message that it will stop the
debugger.
 
G

Guest

I'm using Access 2000.

This database didn't have any real data in it yet, but it's a very complex database for my marketing department, with lots of tables, forms, queries, reports, and macros. I was hoping there was some way to recover it without having to spend hours re-doing what I've already done. I do have a saved version of it somewhere else, but it's several hours behind in development than this one.

Is this also a problem in the Access 2002? I do have the option to upgrade.

Thanks for your help!
 
J

Jeff Conrad

Hi,

This was posted recently from someone at Microsoft:
326605 ACC2000: Issues Fixed in Access 2000 by Office 2000
Service Pack 3
http://support.microsoft.com/?id=326605

304548 ACC2000: Error Message: Error Accessing File.
Network Connection May
http://support.microsoft.com/?id=304548

After applying Office 2000 sp3 you are going to need to
salvage your database modules (Standard, Forms/Reports) by
saving them out to text files. Example:

- Open Form/Report in design view and select menu option
View > Code
- Select the menu option Edit > Select All (to select vba
code)
- Select menu option Edit > Copy
- Paste in Notepad file
- Close VBA window to return to Form/Report
- Within the properties Window of Form/Report change the
property "Has Module" from "Yes" to "No"
(this will delete the code behind the object)
- Save your Form/Report
*** Repeat above steps for each Form/Report that has code

- For your Standard module just open and copy to text files

- Then import all your objects (within exception of your
Modules) to a new database file
- Copy the code from the above text files into new modules
in your new database
- For the Forms/Reports reverse the steps by opening their
VBA modules and pasting the code from the text files

*******************************
You can also try running decompile switch but the above
methods are normally your only shot..


I hope this helps! If you have additional questions on
this topic, please respond back to this posting.


Regards,

Eric Butts
Microsoft Access
Good luck,
Jeff Conrad
Bend, Oregon
-----Original Message-----
I'm using Access 2000.

This database didn't have any real data in it yet, but
it's a very complex database for my marketing department,
with lots of tables, forms, queries, reports, and macros.
I was hoping there was some way to recover it without
having to spend hours re-doing what I've already done. I
do have a saved version of it somewhere else, but it's
several hours behind in development than this one.
 

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