Access keeps closing - help please

ds0203

Registered User.
Local time
Today, 00:38
Joined
Feb 22, 2007
Messages
14
Greetings,

I have a database with several tables, queries, forms, etc. We use "form Alaska" to enter all of our data. I then have some code that I run to perform some append queries, etc to manipulate the data into a different format and into a new table. This all works just fine.

The problem is, that after I run the code and get the data into my final table, if I then want to go back into the form to enter new data or review data, the database closes completely. It does leave the .ldb file open though. I'm able to re-open the database and open up the tables, queries, forms, etc - just not "form Alaska" or one of the sub-forms "tblTaskCitations subform".

My guess is that there is something in the code that is causing this, but I'm not sure what. I have attached the code as it's too long to print here. There is also an event procedure I have that runs the SQL for my action queries and calls the subs listed in the attached code - but all of that works fine.

If anyone has any idea why this is happening I would certainly appreciate the help.

Thanks,
ds
 

Attachments

Hi,

I looked over your code and there does not appear any problem with it.

For some reason I've had problems in the past with some of my dbs. For some reason they would close and the .idb file would remain open and I was then unable re-open them. I would make a copy of the file and I would then be able to open the copy. I then deleted the original copy.

Once I had this happen during the running of some code in a form, similar to your situation. When the code ran, it too closed the db leaving the .idb file open. This continued to happen until I decided to "Strip" the code from the form, save the code in a Word document, rebuild the form, paste the code back into the forms module, and I never had it happen again. I think the probrem was inherent in the form and after re-creating the form and pasting the code, the problem, as I said, went away.

If you are using A2000 it has a bug that you will encounter.

When you import a form or even do a dirrect copy (copy/paste) from one db to another db you will begin to have big problems with the entire db. The way to work around this bug is to strip the code from the form you want to copy to the new db, save the code in Word, on the form properties set the "Has Module" property to NO, save the form, and then copy the form from one db to another. After you have copied the form, open the form in design view, and replace the code.

I'm not saying this will solve your problem, but you might want to give it a try.


Richard

PS: I believe the same problem happens in A2000 when copying or importing Reports.
 
Last edited:
Thank you, by stripping the code and recreating a couple of the forms it works. Thanks!:)
 

Users who are viewing this thread

Back
Top Bottom