Solved

Access 2010 64 bit Compile Error on DAO recordset, can't load DAO 3.6 library

Posted on 2014-02-05
4
1,308 Views
Last Modified: 2014-02-06
Hi Experts,

Rey Obrero kindly gave me a loop that works perfectly on two computers in the sample database we shared.  When I copy the code to the same form on the original database I get a compile error "user defined type not defined" at Dim rs AS DAO recordset.  My research indicates that I'm missing the MS DAO 3.6 Object Library but I can't load it.  I've tried the Mr. Fix It tool from MS without joy.  Don't have a lot of enthusiasm for manually working with the registry but could if needed with good instructions.  In the References list there are no missing items and VBA, Access 14.0 and VBA Extensibility objects are checked.  I've included the sample database and the original for comparison.  Any assistance would be greatly appreciated.  Thanks!
Sample-Database-Loop-Solution.accdb
Menus.accdb
0
Comment
Question by:fargus47
  • 2
4 Comments
 
LVL 19

Expert Comment

by:MINDSUPERB
Comment Utility
In the Tools>Reference, activate Microsoft DAO 3.51 Library.

Sincerely,

Ed
0
 
LVL 24

Accepted Solution

by:
Bitsqueezer earned 500 total points
Comment Utility
Hi,

since A2007 there was a change in the library name because the JET database engine was removed, the new one is called ACE and the library (which is normally by default already loaded) is "Microsoft Office 1x.0 Access database engine Object library" which is the new DAO library. (The "x" depends on your used Office version).

If you have any reference to any DAO library, please remove them.

After that you should be able to recompile ("Debug" - "Compile" in VBA editor) the database without errors (if you do not have any other error in the code/references).

Cheers,

Christian

PS.: It makes no sense to use a field which contains the day name and the week number. The date field is unique, and you can always get the day name and the week number out of the date so you don't need an additional field for that.
0
 

Author Comment

by:fargus47
Comment Utility
Hi,

Thanks for the solution and the advice on the field--much appreciated!
0
 
LVL 24

Expert Comment

by:Bitsqueezer
Comment Utility
Thanks, you're welcome.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

User Beware!  This is a rather permanent solution to removing your email from an exchange server.  The only way to truly go back is to have your exchange administrator restore your mailbox from backups.  This is usually the option of last resort.  A…
The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
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…

763 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

11 Experts available now in Live!

Get 1:1 Help Now