Solved

Access 2007 mccdb to mccdr runtime error in mccdr

Posted on 2010-09-03
4
338 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

This collection of functions covers all the normal rounding methods of just about any numeric value.
Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

772 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now