Solved

Access 2007 mccdb to mccdr runtime error in mccdr

Posted on 2010-09-03
4
352 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 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: 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.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

729 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