• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1415
  • Last Modified:

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

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
Skip Sleeper
Asked:
Skip Sleeper
  • 2
1 Solution
 
MINDSUPERBCommented:
In the Tools>Reference, activate Microsoft DAO 3.51 Library.

Sincerely,

Ed
0
 
BitsqueezerCommented:
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
 
Skip SleeperAuthor Commented:
Hi,

Thanks for the solution and the advice on the field--much appreciated!
0
 
BitsqueezerCommented:
Thanks, you're welcome.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now