Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error accessing file. Network Connection may have been lost.

Status
Not open for further replies.

Ray1127

Programmer
Feb 22, 2002
231
US
Last night I was working on an Access 2000 MDF File. I made some changes and tested everything worked fine. This morning I wanted to make 2 additional changes to the code but when I opened the Database and tried to go into the Module I get the above error. I opened another MDB file and opened a module without problems. I've run a compact and repair without effect. How do I fix this?
 
Looks like you have a corrupted mdb file

1. Try to import all objects (ONE BY ONE) in a fresh database file. You may find out which object is damaged.
2. If no success, search Google for "Decompile"
3.If still no success, restore from the latest backup.

If no backup... you have just learnt you need one the hard way...

In the future, close all VB windows one by one rather than closing the entire project.

HTH

[pipe]
Daniel Vlas
Systems Consultant

 
Close the windows 1 by 1?

I never heard that one. Is this an observation or is there a known issue?
 
It is an observation indeed. I had more corruption problems when there were many VB modules open.

You may notice that when opening a form/report module in Access, you get all modules that were not closed specifically, but alltogether.


[pipe]
Daniel Vlas
Systems Consultant

 
Thanks, thats what I thought I would have to do but was hoping I was wrong. I did find the same issue in 2 other DB's the interesting thing was I haven't even looked at them in several months and apparently the user's haven't either. That's an issue my boss is going to take up at the Management meeting.
 
I'm going to guess that the last thing you did before closing the database in a stable state was either

Import a Module
Import a Form with Code etc

I've had the same issue in 2000 when a module was imported and the database not compiled immediatley following the import.

I found about this by trawling the MS KB

Just make sure if you import and module or code into a database make sure you try and compile the database straight away before doing anything else.
 
Mike, that is exactly what I did. I was combining 3 Access DB's that all use the same SQL Server Linked Tables. To run the Monthly reports required the user to open each db run a couple of reports and then move on to the next DB. The Reports all used similar criteria. I've only been here a couple of months but after looking through the DB's I realized I could combine the 3 set up a form for the criteria and create a Macro to run all of the reports on one step. I had just imported all of the queries, reports and modules I would need prior to going home and then finished in the morning that's when the problem started.

Thanks Now I know how to fix it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top