Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 230
  • Last Modified:

Access lockked file 9

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
chestera
Asked:
chestera
  • 5
  • 3
1 Solution
 
peter57rCommented:
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
 
chesteraAuthor Commented:
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
 
peter57rCommented:
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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
 
chesteraAuthor Commented:
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
 
chesteraAuthor Commented:
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
 
chesteraAuthor Commented:
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
 
peter57rCommented:
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
 
chesteraAuthor Commented:
peter57r

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

Alan
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now