Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Ms Access Compiles without VBA code

Posted on 2014-03-03
6
Medium Priority
?
1,003 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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
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 2000 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

610 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