yoily
asked on
compile error
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?
can someone help me with that?
If you provide the code that causes the error...
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.
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.
ASKER
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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.