Solved

Access 2007 mccdb to mccdr runtime error in mccdr

Posted on 2010-09-03
4
343 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

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.

Question has a verified solution.

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

Suggested Solutions

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…
Outlook Free & Paid Tools
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

929 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

6 Experts available now in Live!

Get 1:1 Help Now