Solved

Ms Access Compiles without VBA code

Posted on 2014-03-03
6
997 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 24

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 24

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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
LVL 58
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 58

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

707 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