Solved

Access 2007 mccdb to mccdr runtime error in mccdr

Posted on 2010-09-03
4
350 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
  • 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 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

Question has a verified solution.

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

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
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 …
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

856 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