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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with errors on Event Procedures

Status
Not open for further replies.

ramrags

IS-IT--Management
Aug 17, 2001
62
US
I have a coding database that I’m building for a small doctor’s office; I was just about done with it when something strange happened. I was working on the design of the forms when any form with an Event Procedure associated with it produces an error. The error comes up and reads “Error accessing file. Network connection may have been lost”. This database is not on a network and is only my local machine. This only affects forms with Event Procedures can anyone help I don’t want to lose all the work I have done. Thank you in advance. Tom
 
First, Compact and Repair the Db, then try importing everything into a new Database. See if that helps.

Paul
 
I suspect that what you have done is some 'tidying up at the end of the project' and you have done something like had the VBA code window open and clicked on a form in the ProjectExplorer window and hit the delete key.

This is a real no-no in Access but there seems to be no trap to stop you doing it.


RECOVERY
Oh yes - you ARE into disastery recovery mode now.
1) If you have a backup then keep it safe. If what follows fails you'll get going back to yesterdays tape.
2) Take a copy of the database NOW and keep that ( just in case. )
3) Create a brand new database
4) Import all of the objects from the problem database, one object type at a time.
Eg Import the Modules
then Import the Reports
then Import the Forms
then Import the Queries if you have any.
5) At some point in the above expect it to fail completely
5.1) Note the name of the object it fails on.
5.2) Delete the database created in stage 3)
5.3) Repeat stage 3) and 4) but make sure that you OMIT the object that caused the problem in 5)
6) Repeat 5) until you get to the end of stage 4 successfully.
7) Compact and repair the new database
8) If the object that caused the problems in 5) is needed then get the last good copy from your backup tape - or re-build from scratch.



'ope-that-'elps.




G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
No NO NO

DO NOT COMPACT AND REPAIR the source before taking a copy.

This has the effect of slamming the door shut with you on the outside.

Yes, Compact and Repair is USUALLY the first try and solves lots of problems. But NOT in this case.


At the end of stage 2 above you can TRY a compact and repair on a COPY if you like ( I've tried this but never got it to do any good ) but compacting and repairing on a db in this delicate state can mash the whole think up.



G.

G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
Sorry, and thanks for heading of any potential disaster. I'll file that under "Read First" in my Repair file.

Paul
 
Thanks for the quick responces I will try everything you said and let you know what heppens. And thats what I think I did i know not to do this anymore Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top