Solved

Access lockked file 9

Posted on 2006-07-07
9
226 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
ID: 17056649
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
ID: 17057194
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
ID: 17057323
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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 84
ID: 17057424
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
 

Author Comment

by:chestera
ID: 17057703
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
ID: 17062679
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
ID: 17063961
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
ID: 17064043
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
ID: 17112279
peter57r

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

Alan
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

685 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