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

Help

Status
Not open for further replies.

Ray1127

Programmer
Feb 22, 2002
231
US
I have an Access 2000 DB. There is a VBA Function in a module that is used in the query of a report. Yesterday it was working without a problem. Today I opened the DB went into the module and attempted to modify the VBA Function. After making the changes I saved them and then attempted to compile the new code. I get the error message: Error accessing file. Network connection may have been lost. The DB is on a network drive. I went into explorer and the network connection is fine. Now the query won't run it gives me an error on the Left(fldname,3) Code.

Anybody have an idea what happened and how I can fix it. If that's not enough info please let me know what else you need to know.

Thanks
 
On the one hand, it sounds like a change you made is causing the code not to compile. In this case post the code here and if you can comment where you made changes and the error you get compiling and the line (if it isn't obvious).

On the other hand it sounds like your file may have become corrupt by a tempory connection issue... Always make a backup first in this scenario. In this case you can try compacting and repairing the database. There is also a command line switch for access to decomiple all the code (/decompile). If you still have problems try importing everything into a replacement file (you'll have to set startup properties, security and any references you added in code again). The last option is Nuclear... go to a backup before it quit working. If your database is not split, you can possibly just delete the problem module, compact repair and just import the module (alternately import everything but the module into a new file and then the module from a working backup).

I'll let you decide how far you want to go before posting your code.
 
Well I did finally figure out (sort of) what caused the problem. I deleted the report I had started working on last night and compacted and repaired the DB and everything is working as it did yesterday. Not sure what I did in the report that caused it but all is well now. I've backed it up and am restarting the report see how it goes this time.
 
I think, if every thing looks ok, then you have be sure the path because every time u modify you have to be sure still you are some path,or if you are using media drives make sure the drive are some to privious path onces.
good luck
 
I think it's because we don't have the ability to access your production data from local PC's we have to develop our access DB's on a Terminal Server and there were some issues with the Terminal Server's last week that were corrected Thursday. I just found out about it today.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top