VBA code disabled in ACCDE format

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Shem K
    New Member
    • Apr 2015
    • 40

    VBA code disabled in ACCDE format

    Hi all.
    The above occurs, when I make an ACCDE format of my ACCBD (Access 2007) database. This means, some commands to be executed by my code are non-functional in the ACCDE, while they work perfectly in the ACCBD.
    The attached screenshot is the warning message that pops up on opening the ACCDE format.

    How do I go about rectifying the error/ malfunction associated with it, hence enabling my VBA code to run in the ACCDE?

    ..
    Otherwise, I may opt to disable access to design view, datasheet view in forms and reports, and hide some objects (tables, queries, macros, modules), including the navigation pane - as a last resort if the above is not possible on my end.

    Thank you.

    [imgnothumb]http://bytes.com/attachment.php? attachmentid=83 29[/imgnothumb]
    Attached Files
    Last edited by zmbd; May 25 '15, 07:52 PM. Reason: [Z{Made attached images visible}]
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    Do you have Office 2007 service pack 2 (link to MS) installed?

    Also this thread: http://bytes.com/topic/access/answer...ecurity-notice
    Last edited by zmbd; May 25 '15, 07:58 PM.

    Comment

    • Shem K
      New Member
      • Apr 2015
      • 40

      #3
      I have Office 2007 Service Pack 3 installed.
      ---

      I've implemented the Registry Edit, which eliminated the Security Notice message (both in accde and accdb). However, my code still disabled in accde.
      ---

      Could it mean that, features Service Pack 3 installed disables my code in accde?

      On the link to SP2, I'll need to ask our IT Manager to allow me to install it on my pc (also, if he could install it on the pcs that will run the database). My work is mostly on databases in the Firm.

      Comment

      • zmbd
        Recognized Expert Moderator Expert
        • Mar 2012
        • 5501

        #4
        if you have service pack 3 installed then you should be ok...
        We skipped Office2007 because of issues like this so I'll have to do a little digging.

        Comment

        • Shem K
          New Member
          • Apr 2015
          • 40

          #5
          Thanks, Z. I guess, in the meantime, I would have to settle for deploying the database in accdb and trust the users wouldn't figure out my manual method of disabling and limiting access to some objects. I'm still scratching through how to disable design view without using accde format, so I preserve the code and its functionality in some of my forms.

          Wish I had known about this issue with Office '07. Had I been in a more administrative role in the Firm, I would have asked one of the Company's main partners to consider installing Office 2010 on all pcs (I'm assuming that Office 2010 upwards is in the clear, though I'd have to test my database on a pc that has it installed)
          Last edited by Shem K; May 28 '15, 12:04 PM. Reason: Included the bit on on Office '07 and 2010

          Comment

          • jforbes
            Recognized Expert Top Contributor
            • Aug 2014
            • 1107

            #6
            I may me missing something, but I'm unsure of your problem. Are you trying to get rid of the Security Message Box that pops up or do you have a situation where you can't get the code to run?

            The code should still run if the user clicks OK on the Security Notice Message Box. The Message Box is a pain in the butt that serves a very important roll. You can usually get rid of the Message Box by adding the Path to the .accde to the Access Trust Center or by thread provided by ZMBD about http://bytes.com/topic/access/answer...ecurity-notice, although I'm pretty sure your IT Manager would have a fit if you start disabling the Security Notices on their PCs.
            Last edited by jforbes; May 29 '15, 06:52 PM. Reason: I can't seem to stop mistyping ZMBD's name

            Comment

            • Shem K
              New Member
              • Apr 2015
              • 40

              #7
              Hi JForbes.
              I think the Message Box remain to work as is.

              My main concern is that Access disables my code on my database's accde format. I thought that by disabling the Security Notice, it would also allow my code to run in accde, which didn't work.
              Z had previously suggested that maybe it's a problem associated with Access '07 (and in Office '07 in general).

              Comment

              • jforbes
                Recognized Expert Top Contributor
                • Aug 2014
                • 1107

                #8
                This seems like some thing worth trying:

                Comment

                • Shem K
                  New Member
                  • Apr 2015
                  • 40

                  #9
                  JForbes, this solves it a great deal! Thank you so much!
                  :-)
                  I debugged my code, now it's running on accde format :-)

                  Comment

                  • jforbes
                    Recognized Expert Top Contributor
                    • Aug 2014
                    • 1107

                    #10
                    That's good news.

                    It's been a while, but I remember running into this myself when coming back to developing in Access. What I did, and suggest to you, is to Customize the Standard Toolbar in the Visual Basic Editor by adding the "Compile Project" Command button right next to the Save Command button. Then whenever I click the Save Button, I click the Compile Button right after it. This has become habitual and I haven't had the problem you experienced since setting this up.

                    Comment

                    • Shem K
                      New Member
                      • Apr 2015
                      • 40

                      #11
                      Thanks for this direction. I've borrowed your concept of the Compile Project button next to Save Button now ;)

                      Comment

                      • NeoPa
                        Recognized Expert Moderator MVP
                        • Oct 2006
                        • 32662

                        #12
                        Originally posted by JForbes
                        JForbes:
                        Then whenever I click the Save Button, I click the Compile Button right after it.
                        Curious. I always compile followed by save. Unless I'm still deep in debugging/developing, I always close all code windows before either of them.

                        Being a bit of a keyboard shortcut man, I don't worry about the toolbars myself, but that's a pretty good idea generally. For anyone interested, the code to close a code window is Ctrl-F4; To compile the project is Alt-D -> L; To save is Ctrl-S.

                        Comment

                        • jforbes
                          Recognized Expert Top Contributor
                          • Aug 2014
                          • 1107

                          #13
                          That's funny about the order of events. I usually go for saving first out of paranoia of loosing those changes, but I can totally see making sure the code compiles before saving so that a user doesn't end up running a database with syntax errors in it.

                          I also use the keyboard for a good many things, but I like having the Compile Button as it will Disable when the code is compiled and Enable when it needs to be compiled. So at a glance, it will indicate if there is unsaved changes... as long as I always Compile and Save at the same time.

                          Comment

                          • NeoPa
                            Recognized Expert Moderator MVP
                            • Oct 2006
                            • 32662

                            #14
                            All makes sense :-)

                            I go for saving afterwards so that I know any saved version has been compiled. At the end of the day though, do what makes you happier ;-)

                            Comment

                            • Shem K
                              New Member
                              • Apr 2015
                              • 40

                              #15
                              Thanks for your great help in taking me through this one, gentlemen :-)

                              Comment

                              Working...