Solved

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

Posted on 2014-02-05
4
1,319 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
ID: 39837952
In the Tools>Reference, activate Microsoft DAO 3.51 Library.

Sincerely,

Ed
0
 
LVL 24

Accepted Solution

by:
Bitsqueezer earned 500 total points
ID: 39838300
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
ID: 39838812
Hi,

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

Expert Comment

by:Bitsqueezer
ID: 39838846
Thanks, you're welcome.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This collection of functions covers all the normal rounding methods of just about any numeric value.
Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

896 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

12 Experts available now in Live!

Get 1:1 Help Now