[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

compile error

Posted on 2011-02-16
5
Medium Priority
?
271 Views
Last Modified: 2012-05-11
i converted a database from 2003 format to 2007, when i try to run a vba code i get this message: 'Compile error: User-defined type not defined'
can someone help me with that?
0
Comment
Question by:yoily
[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
5 Comments
 
LVL 14

Expert Comment

by:svgmuc
ID: 34907120
If you provide the code that causes the error...
0
 
LVL 85
ID: 34907196
After converting, check the References to insure they converted correctly. To do that, open the VBA Editor and click Tools - References. Are any marked as MISSING?

If so, then do this:

1) Note the name and location of the Reference
2) Uncheck the reference
3) Close and reopen the Reference dialog
4) Locate and re-check the reference

If none are marked as MISSING, then do this:

1) Open the Reference dialog
2) Uncheck any reference. Make sure to note the name and location of that reference first
3) Close and reopen the reference dialog
4) Locate and re-check the reference.

Also, BEFORE you convert you database, you should do Compile your application. To do that;

1) Open the VBA Editor
2) Click Debug - Compile. Fix any errors, and continue doing this until the menuitem is disabled
3) Now Compact your database (Tools - Database Utilities - Compact)

Now try converting the database.

Of course, before doing any of this, be sure to make a Backup of your database.

Note too that Access 2007/2010 seems to be much more choosy (and far less forgiving) in regard to VBA code. If, after doing all this, you still find errors, then you'll need to do as svgmuc suggests and locate the code that throws the error and post it here.

0
 

Author Comment

by:yoily
ID: 34907270
0
 
LVL 31

Expert Comment

by:Helen Feddema
ID: 34907667
It appears that you don't have a reference set to whatever object library QBSessionManager belongs to.  Can you check the references in Access 2003?
0
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 total points
ID: 34908361
That's a QuickBooks related item. Does your application interact with Quickbooks? If so, have you installed the necessary files on your machine (i.e. the SDK, or the Merge files)?
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Microsoft has changed the look and feel of Azure AD and Microsoft account sign-in pages so that you will have a more unified look and feel when moving between the two interfaces.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

650 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