Solved

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

Posted on 2014-02-05
4
1,332 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:Skip Sleeper
  • 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:Skip Sleeper
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Outlook Free & Paid Tools
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
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…

770 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