Solved

Access lockked file 9

Posted on 2006-07-07
9
221 Views
Last Modified: 2012-05-05
Hi

Haveing problems with an App I am developing in  Access2000 has been working fine, but now have the problem. I open a form in design view make code changes then save Access freeses up ie the forms objects are visible but can't access I have to Ctl-Alt-delete to end task then reopen. If I decompile/compact from the run command all works ok until I compile compact and repaiir from within access Tools etc. In the folder the app is kept I get a 1k file named Access.lockedfile.9. Other apps ok so the problem is in this app but can't igure out what I have created another db and imported queries, forms reports modules etc to try and isollate no luuck. any help would be appreciated. This pparticular probllem is hard to describe

chestera
0
Comment
Question by:chestera
  • 5
  • 3
9 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 125 total points
Comment Utility
Hi chestera,

Close Access.
If there is a Lock file in the database folder after you have closed Access then delete it.

Create a brand new empty database.
Use File>GetexternalData>Import to import everything from the existing database.
Then, before doing anything else, open a module in design view and use Debug>Compile to make sure there are no errors being reported.

Now check the operation of your form again.

Pete
0
 

Author Comment

by:chestera
Comment Utility
peter57r

Hi Pete

I have already done that I can compile with no error's and then compact/repair ok. Then when I open a form in design view enter some code then exit and save, the form is not highlighted but not blue only a light brown. can't at this stage open any form I have to ctrl-alt-delete to end task then re-open the app. If I decompile and compact from the run command all is ok it's only when I compile from within Access  debug/compile I then can't enter changes to any form. Just designed a new form and saved with a name frmEstimateofHospFees when I run compile I got the message can't find form1

I have been working this app for some months this problem has only just started. I have done something but can't find out what. I am working on a stand alone PC

Alan



0
 
LVL 77

Expert Comment

by:peter57r
Comment Utility
After reading your further comments I don't really know what to suggest.
It is diffcult to know whether you have a problem with your form because of the code you have used or whether there is a problem with your Access installation.

Is it possible for you to try the app on a different machine to try to eliminate one or other of these?

Pete

0
 
LVL 84
Comment Utility
One other suggestion - you could have a problem with only that form. You can try importing to a new, blank database as Pete suggests, but leaving out the one form where you have problems. Open the db, make a few modifications, and see if the problem persists. If not, then import your problem form and see if the problem recurs. If it does, then you likely have a problem with that form. You could then try re-creating the form from scratch, or from a recent known-good backup.

There are also the SaveAsText and LoadFromText options. If you determine that a single form is causing you troubles, try using these undocumented functions to save that form as a textfile, and then import it to your new db as a textfile. To use them, do this from the Immediate Window in your problem db:

?SaveAsText(acForm,"NameOfYourForm","Path_To_Save_Textfile.txt")

This will generate a file at the path you specifiy ... make sure to give it a file name, so your last argument would look something like this: C:\SomeFolder\MyFormName.txt

Now, in your new db, again at the Immediate Window:

?LoadFromText(acForm,"Name_Of_Form",","Path_To_Textfile.txt")

Where the last arugment in the LoadFromText matches the last argument in the SaveAsText call above.
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:chestera
Comment Utility
peter57r

Hi Pete

I did again as you suggested in your first comment and it seems to work I will test thoroughly  and get back to you. I have to leave my PC for a while

Alan
0
 

Author Comment

by:chestera
Comment Utility
peter57r

It works peter. Although I did creadte another Db and imported queries, forms mod etc but made no difference. I might not have compiled first before I tried it. Second time lucky hope it lasts. Many thanks and all the best

Alan
0
 

Author Comment

by:chestera
Comment Utility
peter57r

Hi Pete

All worked fine been working on the app most of the day. Then Bang it started the problem again. I am really at a loss have you any more suggestions.

Alan
0
 
LVL 77

Expert Comment

by:peter57r
Comment Utility
I assume your version of A2000 is as up-to-date as it can be.
I can't suggest anything else that will prevent this happening (other than maybe switch to a later version of Access) so it is definitely worth trying the saveastext and loadfromtext options as suggested by LSM to see if you get better results from that.

You can of course repeat the process of creating a new db and importing and compiling that you did before.

To use the text options withn the db instead I would suggest the steps should be:
Copy the db to provide a backup
Saveastext
delete the form
Compact db
Loadfromtext
Compile db

I can only recall having one similar problem to this myself. That was with A2000 as well and I know I used both of these methods and others such as (a)copying the module into WOrd, deleteing the  the module by deselecyin the HasModule option in the form, and then re-creating a blank one to copy the text back from Word, and also(b) starting the application with the /decompile switch .  (The problem did go away but I have no recollection of what my final approach was)

These methods all amount to pretty much the same thing really which is to try to force Access to 'clean' the code container and start afresh.

Sorry that I can't be more certain about things.

Pete


0
 

Author Comment

by:chestera
Comment Utility
peter57r

Many thanks for your help most appreciated. Sorry for this delay I have been away.
All the best

Alan
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now