Results 1 to 4 of 4
  1. #1
    clancy76 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Oct 2014
    Posts
    25

    DAO issue after converting to .accdb

    Hi all - I'm working on a legacy database that our client wants converted from an mdb to accdb. I did the conversion - everything seemed to go smoothly, until I ran some code that referenced the Fields collection of DAO 3.6 - specifically the "ForeignName" property. When I try to run the code, I get an error that states ""Method or data member not found"(code stops on the line that references the "ForeignName" property) . If I look at the properties and methods of the fields collection in the original mdb, the ForeignName is there, but it's not there in the accdb. I looked at my references for the mdb and the accdb, they're all the same. Anyone have any idea what might be going on? Thanks.

    EDIT - disregard - the problem was that there is a fields collection the DAO library and the Word library, both of which were selected. Just moved the DAO library reference above the Word reference, works fine now, sorry to waste space.

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Thanks for posting your solution, as it could help somebody later. Another solution may have been to disambiguate your declaration. In other words, instead of

    Dim Blah As Whatever

    you'd have

    Dim Blah as DAO.Whatever

    When you do that, the order of the references doesn't matter.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    clancy76 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Oct 2014
    Posts
    25
    Yup, your solution is definitely best practice, thanks pb.

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No problem. As usual, there's more than one way to skin a cat (which the cat is not happy about).
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. ACCDE to ACCDB
    By breakingme10 in forum Security
    Replies: 2
    Last Post: 01-14-2014, 10:04 AM
  2. ACCDB vs ACCDE
    By data808 in forum Access
    Replies: 8
    Last Post: 01-09-2014, 04:39 PM
  3. .accde / .accdb issue
    By HeadGasket in forum Access
    Replies: 4
    Last Post: 02-03-2012, 05:08 PM
  4. external accdb won't unlock
    By taxidev in forum Programming
    Replies: 4
    Last Post: 06-07-2011, 11:53 AM
  5. converting mdb to accdb format
    By crowegreg in forum Access
    Replies: 1
    Last Post: 05-31-2011, 10:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums