Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2014-02-05
4
Medium Priority
?
1,403 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
[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
  • 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 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

636 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