Problems with upgrade to Access 2007

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • preeny8
    New Member
    • Jun 2008
    • 9

    Problems with upgrade to Access 2007

    Hi there,
    I recently updated to Access 2007, and I'm getting a couple of errors that i'm not sure how to deal with.

    I worked with a lot of databases in Access 2003 (.mdb), and for some reason some of these databases will not open in access 2007.

    The errors I get say:

    "An error occured while loading 'Form_frm_tabst rip'. do you want to continue loading the project?" I can choose yes, no or help.

    On choosing yes, another message box pops up that says:

    "The expression On Open you entered as the event property setting produced the following error: Invalid procedure call or argument.
    *The expression may not result in the name of the macro, the name of a used defined function, or [event procedure].
    *There may have been an error evaluating the function, event or macro.

    I'm given the option to show help, and when I click on this it says:

    "This error occurs when an event has failed to run because Microsoft Office Access cannot evaluate the location of the logic for the event. For example, if the OnOpen property of a form is set to =[Field], this error occurs because Access expects a macro or event name to run when the event is fired."

    On choosing no after the first error, a message box popos up and says:

    "The data cannot be opened becasue the VBA project contained in it cannot be read. The database can only be opened if the VBA project is first deleted. Deleting the VBA project removes all cose from modules, forms and reports. You should back up the database before attempting to open the database and delete the VBA project.

    To create a backup copy, click cancel and then make a backup copy of your database. To open the database and delete the VBA project without creating a backup copy, click OK" and I'm given the chooise of choosing OK or cancel, and I choose cancel.



    Why won't my VBA code load for this database? I have different versions of this database with identical code, and these databases load perfectly fine.
  • nico5038
    Recognized Expert Specialist
    • Nov 2006
    • 3080

    #2
    When upgrading, the first rule is to compile the code in the VBA code window to make sure there are no code errors.

    Did you try that ?

    Nic;o)

    Comment

    • vjdominick
      New Member
      • Jul 2008
      • 4

      #3
      I have same problem. Can anyone help or give suggestions?

      Comment

      • missinglinq
        Recognized Expert Specialist
        • Nov 2006
        • 3533

        #4
        Because of the first error message "The expression may not result in the name of the macro, the name of a user defined function, or [event procedure]" I'd check to make sure that there are no References missing. If a function resides in a library that isn't loaded, Access assumes this is a user defined function.

        To check for missing references, open any code module (or open the Debug Window, using Ctrl-G, provided you haven't selected the "keep debug window on top" option). Select Tools | References from the menu bar. Examine all of the selected references.

        If any of the selected references have "MISSING" in front of them, make a note of their names, unselect them, back out of the dialog box, then go back into References and reselect them.

        Welcome, new members, to Bytes!

        Linq ;0)>

        Comment

        • vjdominick
          New Member
          • Jul 2008
          • 4

          #5
          Thanks for replying, Ling.

          I followed your directions to examine the references, I didn't see anything missing. Here is the list that has been checked:
          Visual Basic For applications
          Microsoft Access 12.0 Object Library
          Microsoft Rich Textbox Control 6.0
          OLE Automation
          Microsoft Visual Basic for Applications Extensibility 5.3
          Microsoft office 12.0 Access database engine Object Library

          We are in the middle of software and hardware upgrade. I can open the db in 2000, everything works fine, but if I open the db in 2007, I get the following message, same message when I convert the db to 2007, then open it:
          The expression On click you entered as the event property setting produced the floowing error: Member already exists in an object module from which this object module derives.
          *The expression may not result in the name of a macro, the name of a user-defined function, or [event procedure].
          *There may have been an error evaluating the function, event, or macro.
          If I click Help button, I will get this:
          This error occurs when an event has failed to run because Microsoft Office Access cannot evaluate the location of the logic for the event. For example, if the OnOpen property of a form is set to =[field], this error occurs because Access expects a macro or event name to run when the event is fired.

          Please help! I really need to get this solved by next week.
          Thanks in advance.

          V

          Comment

          • missinglinq
            Recognized Expert Specialist
            • Nov 2006
            • 3533

            #6
            I'm sorry, trying to do too many things at once! In version 2007, in order for VBA code to execute, the folder holding the database needs to be designated as a “trusted” location. This may be the problem.

            To trust your folder, click:
            * Office Button (top left)
            * Access Options (bottom of dialog)
            * Trust Center (left)
            * Trust Center Settings (button)
            * Trusted Locations (left)
            * Add new location (button)

            Linq ;0)>

            Comment

            • vjdominick
              New Member
              • Jul 2008
              • 4

              #7
              Thanks for speedy response.

              I had created a trust folder to put all the front end in there. So I know it's not the trust issue.

              I am not a VB programmer, this is new to me. I just try to use the debug window. and got this message:
              Compile error:
              member already exists in an object module from which this object module derives.

              Then in the code window: Dim DataChange As Boolean is hightlighted.
              Is that means DataChange is a reserved word?

              V

              Comment

              • vjdominick
                New Member
                • Jul 2008
                • 4

                #8
                It's working now. Thanks for everything. That is the problem. I just has to rename the variable.

                V

                Comment

                Working...