Error Accessing File. Network connect may have been lost

Alpf

New member
Local time
Today, 09:17
Joined
Oct 29, 2019
Messages
5
I have been developing an application for several weeks. Today, when I try to run it I get the message: Error Accessing File. Network connect may have been lost. Nothing seems to run with the VBA code on any of the forms.
 
Hi. Welcome to AWF! Just this one db? Are other dbs okay? You mentioned VBA code, are manual stuff working fine? For example, if you're linked to a BE file across the network, are you able to open the table and edit the data by hand?
 
More thoughts
1. If no VBA code runs, the database may not be trusted e.g. because you've moved it to a non trusted location. Is the yellow security bar and button visible?
2. Also, is it a split database with a wireless connection to the network where the BE is located?
 
I have also just gotten this problem. The error message only pops up on button clicks on one of my forms. Buttons on other forms work as intended. For example, on a button on my member info form, to open a form to enter a membership dues payment, the only event set up is the "On Click". Here is my code:

Private Sub Post_Payment_Click()
DoCmd.OpenForm "PaymentsF"
Me.Requery

End Sub

Any guidance would be greatly appreciated.
 
I have also just gotten this problem. The error message only pops up on button clicks on one of my forms. Buttons on other forms work as intended. For example, on a button on my member info form, to open a form to enter a membership dues payment, the only event set up is the "On Click". Here is my code:

Private Sub Post_Payment_Click()
DoCmd.OpenForm "PaymentsF"
Me.Requery

End Sub

Any guidance would be greatly appreciated.
Which of the previous suggestions have you already implemented?
 
@gerryo - this is a four-year-old thread and we got no feedback from the original poster (OP). We don't know what actually happened with the OP's problem. All we can tell you is that it is one of a few possible things.

1. Some type of corruption. To fix this, start by making a backup copy. THIS STEP IS CRUCIAL!!!! Do NOT proceed with anything else until you have a good backup copy. You don't want to lose anything if the fixes go wrong. After that backup has been made (simple copy/paste to a convenient other folder is all you needed), try these:

1.a. Simple corruption: Perform a Compact & Repair. Since you have that backup, if the C&R fails, you can get back to where you are. If the C&R works, problem solved.

1.b. Another type of corruption of compiled code... see the DECOMPILE option in the link below. It is about the 4th section title in the linked page.


Don't forget that you need to manually compile after you do a decompile. The FMS, Inc. article explains how to do that.

1.c. The form is REALLY bollixed up. From the External Data segment of the ribbon. try to export the form to a text file, which is permitted in Access. Then delete the form, perform a C&R, and reload that form from the text file you just created.

1.d. Since you still have a backup, delete the form from the current copy and use the External Data section of the ribbon to try to import the form from the backup. It MUST be done as an IMPORT from the backup since trying to do an EXPORT from the backup might exacerbate the corruption. Direction of data flow IS important in this case. NEVER direct any actions INTO your backup, since it is your lifeline.

1.e. Again, since you have a backup, delete the form and attempt to manually recreate it.

1.f. If this ALSO fails, immediately create a blank database and use the backup copy as a source target for a complete import of everything (in the backup file) to the new, currently empty file. Things that do not successfully import are indicators of severe types of corruption.

2. You got caught in patch Hell. Use the Start >> Settings >> Update >> Update History path to see if you had a Windows Update just before your problem started. I'm actually including this only for completeness because from your description, it is too selective to be a general patch disorder. You said only one form was affected. But if nothing else works, you could try to roll back the patch to see if that helps.
 
Thanks The_Doc_Man for your guidance. After trying all the suggestions, and in the order you provided, nothing worked. I created a new blank database and started importing tables, queries, etc. I appears that from the initial form that was corrupted, several more caught the disease. I now have the unenviable task of re-creating all the missing forms, and improving some along the way. Thanks again.
 
I wish I knew of a better way to handle that, but as a side note... when you get it all working again, consider a schedule of backups where you know that no one is in the DB and just copy the file to a set-aside directory so that you can import critical components from a relatively recent copy. Then, at least, you would be unlikely to lose forms, reports, or modules. Our site had a regular backup done by operations staff starting at midnight or 1 AM and it was usually good unless some chowderhead left the DB open overnight.
 

Users who are viewing this thread

Back
Top Bottom