Results 1 to 10 of 10
  1. #1
    Join Date
    Apr 2013
    Posts
    24

    Unanswered: Object Libraries in Access 2007

    Hi All,

    I have an Access 2007 database that I have been adding VBA code to.

    My problem is this: part of my code automatically sends an email from Outlook and another part performs a certain action depending on the date.

    Both of these commands work fine (with MS Outlook & Excel 12.0 OL) but every now and then when I open up Access (after my PC has been turned off) I get an error message saying that the object libraries are missing. When I look at which libraries are selected I find that it has changed to MS Outlook & Excel 15.0 OL and has them labeled as 'missing' if I deselect 15.0 and reselect 12.0 then the code works fine again.

    Can someone please tell me why it keeps switching and how I can get it to remember 12.0 so the code works all the time?

    Thanks,
    Gav

  2. #2
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    119
    When you select the correct references in the VBA module are you saving it?

    Also, are you or anyone else opening the database in Access 2013 at any point?
    And do you have Access 2013 also installed on the PC you are using Access 2007 with.
    Regards
    JD

    Software-Matters

  3. #3
    Join Date
    Apr 2013
    Posts
    24
    Quote Originally Posted by SoftwareMatters View Post
    When you select the correct references in the VBA module are you saving it?

    Also, are you or anyone else opening the database in Access 2013 at any point?
    And do you have Access 2013 also installed on the PC you are using Access 2007 with.
    Hi SM,

    Sorry for the late reply, I've been out of the office.

    Yes I save it after changing which library is selected but it still changes it back.

    As for the issue of other users it's probably best if I describe our office setup:
    We have the PC I use which has only Access 2007 (the machine I wrote the DB/code on & where the issue happens most often),

    3 PCs with only Access 2010 (these have not started using this DB yet but on a test run 2 of them had the library issue (I wasn't able to test the 3rd as it is always in use)),

    1 PC with Access 2010 (the other one that has the issue often) (this machine also has Access 2002 because they need it to open an old DB that isn't compatable with Access 2010),

    and finally we have 3 Laptops that run Access 2013 (these are the ones that use the DB most often but have never had the libraries issue)

    I know it's a terrible setup but I've been brought in as a temp and they have a low budget so that's what I have to work with

    I assume that the laptops are changing the libraries to the 2013 set and that's what's causing the problem? If this is the case then is there any way of stopping that? maybe setting a default setup?

    Thanks for your help,
    Gav

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    are you using separate (ideally local) front ends for each user?
    i could understand this behaviour if its a common front end.
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Apr 2013
    Posts
    24
    Quote Originally Posted by healdem View Post
    are you using separate (ideally local) front ends for each user?
    i could understand this behaviour if its a common front end.
    Hi Healdem,

    I haven't really had much experience with a front end/back end DB setup so I just followed the Access help files. What I have done is split the DB then put a shortcut on the desktop of everyone's machines to the front end (both FE & BE are saved on a server in the same folder)

    I assume from your question that there is a better way of doing this? If so please can you give me a rough guide of what you suggest and hopefully that'll solve the problem.

    Thanks,
    Gav

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    having a single front end is a recipe for disaster. each user ideally ought to have their own front end (aie a copy of 'the' front end)

    what I suspect may be happening is that when you open the friont end on your machine its fine. when you open it on an A2013 machine, A2013 automatically works out that its using old libraries and changes the libraries to suit the new version, and then saves the changes. when you open the app on your machine it then finds A2013 libraries and curls up and dies. the change works OK going to a higher version but not t'other way round.

    OR deply the app as an encrypted MDE/ACCDE rather than a MDB/ACCDB.

    I can't guarantee that is what is happening as I don't do that much Access stuff these days and I've always worked common environment but it has the feel of that sort of problem
    I'd rather be riding on the Tiger 800 or the Norton

  7. #7
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    119
    As Healdem says the issue is that Access 2013 is taking control of the references and therefore any versions prior to 2013 will end up with an error. This is something I see quite often with my clients who don't upgrade all their PC's at once. The only way around it is to have separate front ends for the different versions. IF you need help with this let us know.
    Regards
    JD

    Software-Matters

  8. #8
    Join Date
    Apr 2013
    Posts
    24
    Quote Originally Posted by healdem View Post
    having a single front end is a recipe for disaster. each user ideally ought to have their own front end (aie a copy of 'the' front end)

    what I suspect may be happening is that when you open the friont end on your machine its fine. when you open it on an A2013 machine, A2013 automatically works out that its using old libraries and changes the libraries to suit the new version, and then saves the changes. when you open the app on your machine it then finds A2013 libraries and curls up and dies. the change works OK going to a higher version but not t'other way round.

    OR deply the app as an encrypted MDE/ACCDE rather than a MDB/ACCDB.

    I can't guarantee that is what is happening as I don't do that much Access stuff these days and I've always worked common environment but it has the feel of that sort of problem
    What your saying totally makes sense so I'll look into trying that to see if it solves the problem, thanks.

    The main reason for doing a shortcut rather than a copy was that the client keeps asking for things to be changed and I thought it would be easier to just change one server copy than to change/re-copy a version on everyone's computers. Just goes to prove that laziness doesn't pay off I suppose lol.

    Thanks again,
    Gav

  9. #9
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    there is code in the codebank that will automatically update local copies of the front end
    I'd rather be riding on the Tiger 800 or the Norton

  10. #10
    Join Date
    Apr 2013
    Posts
    24
    ok, thanks. I'll check that out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •