?
Solved

Access 2007 mccdb to mccdr runtime error in mccdr

Posted on 2010-09-03
4
Medium Priority
?
355 Views
Last Modified: 2012-05-10
i have a mccdb app that i changed the extension to mccdr and opened it.

the first form appeared as usual.  when i clicked on a button, i got a runtime error.  no id on the error.

any suggestions on how i can trouble shoot this?

i have never done a mccdr conversion b4.

any ideas?

thanks,

Cg

0
Comment
Question by:williecg
[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
  • 2
4 Comments
 
LVL 16

Expert Comment

by:Sheils
ID: 33602230
I pays to do a compact and repair and a compile before you convert.

Open the vb editor window.
Go to debug>compile

Once you have iron out all the errors close the editor window. In the access window find compact and repair (not sure where it is in 2007).
Then create a blank database. Import your database into it.
Convert the new database
0
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 total points
ID: 33602586
It is imperative that you include full Error handling in a Runtime application. The Runtime cannot use the standard Access/VBA error handler, so you must do this yourself. Basically, for every code procedure, you include a line like this:

On Error GoTo Err_Handler

And then further down the line:

Err_Handler:
  '/you handle the error here

There are some 3rd party utilities that can assist you in adding error handling. One of the more popular is mz-tools (www.mz-tools.com), which is free.

BTW: To Compact your db in 2007,  you click the Office button - Manage - Compact.
0
 

Author Comment

by:williecg
ID: 33608644
sb9:
LSMConsulting:

sb9:
thanks, makes sense, however did not work.

LSMConsulting:
great lead, I am in the process of adding error trap to every procedure.  I am using the freeware you suggested.

I look forward to it all working.

I will let you guys know if it works.

Wcg



0
 

Author Closing Comment

by:williecg
ID: 33617296
Used the freeware, set up a micro app with just the area that was causing the problem.

At first I was not getting a trapped or untrapped runtime error in accdb.
Was getting untrapped error in accdr.
Kept cutting away at the code until I found what caused an error in accdr. (still no trapped error message).
Fixed that and reran accdb.  
Got trapped error message. Fixed that and reran in accdr. WORKED.

It seemed i had 2 errors, one masking the other.  i had if/endif with an end in the logic.  
It liked it when i used if/else/endif. the end then was at the end.  Never got trapped error.

The trapped error had to do with rst.close.  It said the object did not exist.  I moved the statement and it worked.

Thanks,
WCG
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

800 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