Microsoft access has stopped working, when importing objects to ms 2010

Hi
I have ms access 2010 accdb , windows 7
I was like to clean it up
I had open a new empty accdb
Then I try to import all objects from the old accdb
It can import all of the objects fine, but I have this err message always appear at the last object to be imported " Microsoft access has stopped working" . and when I run my app. It seem to me that it works good.
I try to do the importing objects  again and again, and I get the same err. every time.
Any help please
Mohammad Alsolaimanapplication programmerAsked:
Who is Participating?
 
Bill RossCommented:
Hi,

I would suggest importing objects per group like forms/report/modules/queries separately and see what fails.  When you find the group that fails start again and import half the objects in the group the 1/4th, etc. until you find the "bad" object.

Bill
0
 
armchair_scouseCommented:
When you say you are trying to 'clean up' the database, what do you mean?  If you are importing everything from the existing database into a new database, then are you not just creating a duplicate? :o)

N.B.  Before doing any of the following, make sure you have a backup of your database,
a) Have you tried a 'Compact and Repair' on your existing database?  Do you get any errors when you try to do so?
b) Does your database have VBA code?  If it does have VBA code, can it compile successfully?  If not, is the problem due to referencing something that doesn't work in Access 2010/Win 7?  Perhaps something to investigate...
c) You could try decompiling the database and then doing a compact and repair.  To decompile the database, use (something similar to) the following syntax:
"C:\Program Files\Microsoft Office\Office14\MSACCESS.EXE" "C:\MyAccess.accdb" /decompile
and once the database is opened, perform a Compact and Repair.
d) If there is a corruption/problem in your database, then one trick you could try (that I have used many times successfully) is as follows:
 i) Create a new blank database, and create a code module in the database
ii) Open up the VBA Editor (if not already opened), and go to Tools -> References
iii) Add your corrupted database as a reference to your new database.  If this works, you should see your corrupted database in the Project Explorer.
iv) If the corrupted database has a password on the VBA code, then select/expand it in the Project Explorer.  You be prompted to enter the password.  Once unlocked, your new session of Access will be able to import the objects from the old database.
v) Run the Import wizard via External Data -> Access, select the option to 'Import tables, queries, forms...etc.' and import everything from the old database.
vi) If all goes well, you should have all of the objects from the old database in your new database, so go back to Tools -> References and remove the reference to your old database.

If none of the above prove useful, then there was an excellent post on troubleshooting Access issues (around such things as database corruption), I'm hoping one of my learned colleagues on the forum will post a link to it subsequently!!

Hope this helps.
0
 
Jeffrey CoachmanMIS LiasonCommented:
Don't quote me, ...but I think there was a question a while ago where the solution was to change the Order of the VBA References
(list all the MS Office App references first)
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Mohammad Alsolaimanapplication programmerAuthor Commented:
I had try a 'Compact and Repair' on my existing database,  and no any errors when i try to do so.
My database has VBA code and it compiles successfully.
I had import objects per group like forms/report/modules/queries separately and what I found is
When I import form or modules I get this err.
It stock at the very last form (in case of forms) , or the very last module(in case of importing modules) .
So when I select some forms and not all forms it stock with the last form I select.
And I want to let you know that my access file is work fine(I mean I can run all functions good, but I am wondering of why I cannot import it to a new blank accdb?
I have another access app. And I can import all of it's objects, but when it reach the last object it take a long time then it succeed .
0
 
Bill RossCommented:
Hi,

You must investigate the objects that won't import.  Sounds like you have 1 bad form and maybe some bad code.  
See if the code compiles.  
Open the form in design view and save it as a backup form.  See if the backup imports.  If not, remove the code from the form and see if it imports then.

If so then fix the code.  If not then you have a corrupt form - whether it works or not.

Regards,

Bill
0
 
Mohammad Alsolaimanapplication programmerAuthor Commented:
thanks to all of you for the good information
i found out one form is corrupted , so i copy the controls and code for that form and past them in new form in new database
and everything seems to be O. K.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.