I have seen this error at two times.
The first is when the network connection is truly lost or renamed. You can correct this using Tools>DatabaseUtilities>Link Table Manager and refresh links/location.
The second case is a little misleading. Here is the scenario.
If you copy a form, report or code module or you import the same or if you rename any of these modules, the next step is to compile the source code.
If you fail to do this, Access may get confused and the source code becomes unusable. This is a bug in Access 2000 and on. If this happens, access thinks it can not find the source code for the form and then becomes corrupt and gives you the 'Network' error message.
Once this 'Network error message pops up' at least one of the code modules is bad and you will not be able to recover unless you have a good backup version. So, backups are important.
Try This:
1) Open a form or report in design view
2) Open up the code window
3) Select Debug>Compile Database
4) If it compiles, then this is probably not your problem
but, if it can not open and compile all modules, then you have a code problem. (sounds like you have already done this)
Importing or Exporting can not fix this issue if the code is bad.
You could try the Standalone 'Compact' utility from microsoft:
or
You can try:
1) If you have a backup copy, use it. I make copies of my access mdb almost hourly so if something like this happens, I can get a good copy quickly.
or (If you do not have a backup copy)
2) Create a new, blank Access mdb and try to import all objects except the one bad form from the Db in question.
Also:
open a code window, select Tools>References and make sure all references are good.
Note:
What you need to do to prevent this in the future:
Whenever you copy, import or rename an object with VBA code, the very next step is to open a code window and compile the source. This error started showing up in Access 2000. It was not an issue in Access 97. (Note: The error message is misleading, but is telling you that Access can not find the code module)
Good Luck,
Hap...
Access Developer
Access based Add-on Solutions
Access Consultants forum