Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Access lockked file 9

Posted on 2006-07-07
9
Medium Priority
?
229 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 500 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 85
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

715 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