Results 1 to 6 of 6
  1. #1
    New Lounger
    Join Date
    Sep 2008
    Location
    Brisbane, Australia
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post Missing reference?

    I am reasonably experienced in writing custom database applications using Access 2003 and VB6. My computer recently had a conniption fit and I decided to take the plunge and use Access 2007.

    I have had a lot of trouble finding familiar tools in unfamiliar places, but I have a problem I haven't solved. The code <DoCmd.Close> does not work. My investigations suggested that I needed to move the project to a "trusted" area, so I did. No luck.

    I suspect that I lack a reference. How do I find out what reference is needed for what facilities?

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts
    Do you know if the code is in fact executing? Why don't you set a breakpoint and see if it stops on that line.

    While you are in the code, why don't you check the references to see if any are missing.
    Last edited by patt; 2011-04-11 at 22:54. Reason: additional thought

  3. #3
    New Lounger
    Join Date
    Sep 2008
    Location
    Brisbane, Australia
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The code does execute as far as the command (not very far) and the error message refers to "The expression On Click you entered as the event property setting produced the following error: A problem occurred while Microsoft Office Access was communicating with the OLE server or ActiveX control" The help suggested that the problem was one of trust.

    A ridiculous situation exists in that DoCmd.OpenForm <reportname> works fine in one form, and has the same result in another.

    There is no missing reference shown in the list.
    Last edited by alansailor; 2011-04-12 at 01:57. Reason: Left out part of answer

  4. #4
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    I would try a decompile. A good thing to try when inexplicable errors occur.

    Also, if not done already, a Compact and Repair. (in 2007 this is within Manage, under the Office button.)
    Regards
    John



  5. #5
    New Lounger
    Join Date
    Sep 2008
    Location
    Brisbane, Australia
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Red face Probably solved

    I think I have found what was wrong. The database was originally conceived in Access 2003 and being run in 2007. I have created a new, empty database in 2007 and imported all the bits from the old. It is not working perfectly yet, but I suspect I can solve whatever problems crop up. It seems likely that mongrels behave like mongrels, even in software. Thank you for trying to help me fix the unfixable.

    No doubt I'll be along later with something else. Much of what is new appeals to me. If only I could find everything!

  6. #6
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    I have lots of databases created in 2003 (or earlier) and now used with 2007 or 2010. I have needed to decompile some of them, but problems have been rare.

    I have not found any good reasons to update the format to the new accdb format (and some good reasons not to) so I have always managed to get the older db working again.
    Regards
    John



Tags for this Thread

Posting Permissions

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