Solved

Ms Access Compiles without VBA code

Posted on 2014-03-03
6
995 Views
Last Modified: 2014-03-04
Hi Experts

I have an Access Datafile with some VBA forms and code, when I "Make MDE" file with the Datafile it creates the MDE file ok, but when I launch the MDE file it appears that no VBA code has been included with the build.

Is there anything that I might have missed?

I can compile the code via VBA debug menu with no problems.
0
Comment
Question by:MrDavidThorn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 23

Expert Comment

by:Eirman
ID: 39900589
Is the code working, and not visible?
No code is visible within a MDE file.
0
 

Author Comment

by:MrDavidThorn
ID: 39900591
Its not working, I think it may be do with the Signature.
0
 
LVL 23

Expert Comment

by:Eirman
ID: 39900625
Try decompiling your MDB file and recompiling as described here ...
http://stackoverflow.com/questions/3266542/how-does-one-decompile-and-recompile-a-database-application

Or here
http://social.msdn.microsoft.com/Forums/office/en-US/72b842b0-86a0-4476-afc3-ae9d5ea740ff/decompile-steps-for-mdb?forum=accessdev

Well described here ....
http://forums.databasejournal.com/showthread.php?34222-Decompiling-VBA-code-in-an-Access-mdb-file

Routine decompiling is almost as important as routine compacting.

(If you are trying to run the MDE file on another PC there could be library issues).
0
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
LVL 57
ID: 39900689
More then likely, it's "macro" security that is stopping the DB from executing.  It must be in a trusted location, or the macro security level must be set to low.

If it made a MDE successfully, then I doubt there is a problem with the code.

Jim.
0
 

Author Comment

by:MrDavidThorn
ID: 39900721
Im testing with a form that just displays a simple msgbox when the db is loaded, works before the code is published but not in the MDE file.  The code is not digitally signed, but in [Access Options],[Trust center],[Trusted Publishers]  their is a list of valid publishers. Would this have an impact?

This app is a for a global business so they have more than likely got some global setting that is not validating the MDE
0
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 39900808
The DB will need to be either digitally signed, run from a trusted location, or Access have macro security disabled.

Here's info on security issues:

http://office.microsoft.com/en-us/access-help/get-started-with-access-2007-security-HA010198047.aspx

  including how to digitally sign the DB.  You of course need to be deploying with the packaging wizard.

 On setting a trusted location, here's some info on that:

http://office.microsoft.com/en-us/word-help/create-remove-or-change-a-trusted-location-for-your-files-HA010031999.aspx

 For doing it manually.  Or as part of your deployment, you can create trusted locations.  It's simply adding a entry in the registry, but you cannot do this from the runtime install itself.

 Here's a link to a .EXE package that you can deploy to set an entry along with the registry keys were the path needs to be stored:

http://www.accessribbon.de/en/index.php?Trust_Center:Trusted_Locations

  Changing the macro security level is not a good option.

  Until you do one of the three, any VBA code will not run.

Jim.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question